From bfd84553648c5e6d5de5e6abbf0ea1249ed332d7 Mon Sep 17 00:00:00 2001 From: Rajith Muditha Attapattu Date: Thu, 26 Mar 2009 19:47:58 +0000 Subject: This is a simple fix for the problem highlighted in QPID-1777 git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@758820 13f79535-47bb-0310-9956-ffa450edef68 --- .../apache/qpid/jndi/PropertiesFileInitialContextFactory.java | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'java/client') diff --git a/java/client/src/main/java/org/apache/qpid/jndi/PropertiesFileInitialContextFactory.java b/java/client/src/main/java/org/apache/qpid/jndi/PropertiesFileInitialContextFactory.java index 43ac56dee9..4b92d972b2 100644 --- a/java/client/src/main/java/org/apache/qpid/jndi/PropertiesFileInitialContextFactory.java +++ b/java/client/src/main/java/org/apache/qpid/jndi/PropertiesFileInitialContextFactory.java @@ -126,7 +126,7 @@ public class PropertiesFileInitialContextFactory implements InitialContextFactor if (key.startsWith(CONNECTION_FACTORY_PREFIX)) { String jndiName = key.substring(CONNECTION_FACTORY_PREFIX.length()); - ConnectionFactory cf = createFactory(entry.getValue().toString()); + ConnectionFactory cf = createFactory(entry.getValue().toString().trim()); if (cf != null) { data.put(jndiName, cf); @@ -144,7 +144,7 @@ public class PropertiesFileInitialContextFactory implements InitialContextFactor if (key.startsWith(DESTINATION_PREFIX)) { String jndiName = key.substring(DESTINATION_PREFIX.length()); - Destination dest = createDestination(entry.getValue().toString()); + Destination dest = createDestination(entry.getValue().toString().trim()); if (dest != null) { data.put(jndiName, dest); @@ -162,7 +162,7 @@ public class PropertiesFileInitialContextFactory implements InitialContextFactor if (key.startsWith(QUEUE_PREFIX)) { String jndiName = key.substring(QUEUE_PREFIX.length()); - Queue q = createQueue(entry.getValue().toString()); + Queue q = createQueue(entry.getValue().toString().trim()); if (q != null) { data.put(jndiName, q); @@ -180,7 +180,7 @@ public class PropertiesFileInitialContextFactory implements InitialContextFactor if (key.startsWith(TOPIC_PREFIX)) { String jndiName = key.substring(TOPIC_PREFIX.length()); - Topic t = createTopic(entry.getValue().toString()); + Topic t = createTopic(entry.getValue().toString().trim()); if (t != null) { if (_logger.isDebugEnabled()) @@ -283,7 +283,7 @@ public class PropertiesFileInitialContextFactory implements InitialContextFactor int i = 0; for (String key:keys) { - bindings[i] = new AMQShortString(key); + bindings[i] = new AMQShortString(key.trim()); i++; } // The Destination has a dual nature. If this was used for a producer the key is used -- cgit v1.2.1