summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRajith Muditha Attapattu <rajith@apache.org>2008-10-23 18:55:08 +0000
committerRajith Muditha Attapattu <rajith@apache.org>2008-10-23 18:55:08 +0000
commit99c1552947bea5118b09c5034f6788cc93e2feca (patch)
tree5ea53bd8425e8daf90037bca6a3e7edf32d91ece
parent406f8bbabfa3b89480213d1744b940772b39673b (diff)
downloadqpid-python-99c1552947bea5118b09c5034f6788cc93e2feca.tar.gz
This is related to QPID-1319
Agree with Aidan that SSL should only be a broker level option. I have removed the code that copied the top level ssl value to the broker options. I will also correct the examples on the qpid wiki page git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid@707443 13f79535-47bb-0310-9956-ffa450edef68
-rw-r--r--java/client/src/main/java/org/apache/qpid/client/AMQBrokerDetails.java19
-rw-r--r--java/client/src/test/java/org/apache/qpid/test/unit/client/BrokerDetails/BrokerDetailsTest.java11
2 files changed, 2 insertions, 28 deletions
diff --git a/java/client/src/main/java/org/apache/qpid/client/AMQBrokerDetails.java b/java/client/src/main/java/org/apache/qpid/client/AMQBrokerDetails.java
index fefb78d681..63c46e8dfc 100644
--- a/java/client/src/main/java/org/apache/qpid/client/AMQBrokerDetails.java
+++ b/java/client/src/main/java/org/apache/qpid/client/AMQBrokerDetails.java
@@ -49,15 +49,7 @@ public class AMQBrokerDetails implements BrokerDetails
public AMQBrokerDetails(String url,Map<String, String> options) throws URLSyntaxException
{
- /* According to the wiki the AMQBroker options should default to connection level options.
- unless overridden by broker specific options.
- Currently there seems to be only one such option (SSL).
- */
- if (options != null)
- {
- _options.put(ConnectionURL.OPTIONS_SSL,options.get(ConnectionURL.OPTIONS_SSL));
- }
-
+
// URL should be of format tcp://host:port?option='value',option='value'
try
{
@@ -268,14 +260,7 @@ public class AMQBrokerDetails implements BrokerDetails
{
if (_options.containsKey(ConnectionURL.OPTIONS_SSL))
{
- try
- {
- return Boolean.parseBoolean(_options.get(ConnectionURL.OPTIONS_SSL));
- }
- catch (NumberFormatException nfe)
- {
- //Do nothing as we will use the default below.
- }
+ return Boolean.parseBoolean(_options.get(ConnectionURL.OPTIONS_SSL));
}
return false;
diff --git a/java/client/src/test/java/org/apache/qpid/test/unit/client/BrokerDetails/BrokerDetailsTest.java b/java/client/src/test/java/org/apache/qpid/test/unit/client/BrokerDetails/BrokerDetailsTest.java
index c3175317e6..1b27ff6300 100644
--- a/java/client/src/test/java/org/apache/qpid/test/unit/client/BrokerDetails/BrokerDetailsTest.java
+++ b/java/client/src/test/java/org/apache/qpid/test/unit/client/BrokerDetails/BrokerDetailsTest.java
@@ -91,17 +91,6 @@ public class BrokerDetailsTest extends TestCase
}
}
-
- public void testBrokerDefaultsToTopLevelOptions() throws URLSyntaxException
- {
- String url = "amqp://guest:guest@clientid/test?ssl='false'&brokerlist='tcp://localhost:5672?ssl='true';tcp://myhost:5672'";
- ConnectionURL connectionurl = new AMQConnectionURL(url);
- BrokerDetails bd1 = connectionurl.getBrokerDetails(0);
- BrokerDetails bd2 = connectionurl.getBrokerDetails(1);
-
- assertTrue("Broker option should override the top level option",bd1.useSSL());
- assertFalse("Broker options should default to the top level options",bd2.useSSL());
- }
public static junit.framework.Test suite()
{