From 65454017fce53f2e5a3d07577e4ba8499c0d68ca Mon Sep 17 00:00:00 2001 From: Robert Davies Date: Wed, 5 Sep 2007 15:47:20 +0000 Subject: [PATCH] Ensure system safe names are used for container names git-svn-id: https://svn.apache.org/repos/asf/activemq/trunk@572975 13f79535-47bb-0310-9956-ffa450edef68 --- .../main/java/org/apache/activemq/kaha/impl/KahaStore.java | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/activemq-core/src/main/java/org/apache/activemq/kaha/impl/KahaStore.java b/activemq-core/src/main/java/org/apache/activemq/kaha/impl/KahaStore.java index 0838f58863..92a2e3732a 100644 --- a/activemq-core/src/main/java/org/apache/activemq/kaha/impl/KahaStore.java +++ b/activemq-core/src/main/java/org/apache/activemq/kaha/impl/KahaStore.java @@ -217,9 +217,10 @@ public class KahaStore implements Store { return getMapContainer(id, containerName, persistentIndex); } - public synchronized MapContainer getMapContainer(Object id, String containerName, boolean persistentIndex) + public synchronized MapContainer getMapContainer(Object id, String originalContainerName, boolean persistentIndex) throws IOException { initialize(); + String containerName = IOHelper.toFileSystemSafeName(originalContainerName); ContainerId containerId = new ContainerId(); containerId.setKey(id); containerId.setDataContainerName(containerName); @@ -286,9 +287,10 @@ public class KahaStore implements Store { return getListContainer(id, containerName, persistentIndex); } - public synchronized ListContainer getListContainer(Object id, String containerName, + public synchronized ListContainer getListContainer(Object id, String originalContainerName, boolean persistentIndex) throws IOException { initialize(); + String containerName = IOHelper.toFileSystemSafeName(originalContainerName); ContainerId containerId = new ContainerId(); containerId.setKey(id); containerId.setDataContainerName(containerName);