qpid-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From raj...@apache.org
Subject svn commit: r707443 - in /incubator/qpid/trunk/qpid/java/client/src: main/java/org/apache/qpid/client/AMQBrokerDetails.java test/java/org/apache/qpid/test/unit/client/BrokerDetails/BrokerDetailsTest.java
Date Thu, 23 Oct 2008 18:55:08 GMT
Author: rajith
Date: Thu Oct 23 11:55:08 2008
New Revision: 707443

URL: http://svn.apache.org/viewvc?rev=707443&view=rev
Log:
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

Modified:
    incubator/qpid/trunk/qpid/java/client/src/main/java/org/apache/qpid/client/AMQBrokerDetails.java
    incubator/qpid/trunk/qpid/java/client/src/test/java/org/apache/qpid/test/unit/client/BrokerDetails/BrokerDetailsTest.java

Modified: incubator/qpid/trunk/qpid/java/client/src/main/java/org/apache/qpid/client/AMQBrokerDetails.java
URL: http://svn.apache.org/viewvc/incubator/qpid/trunk/qpid/java/client/src/main/java/org/apache/qpid/client/AMQBrokerDetails.java?rev=707443&r1=707442&r2=707443&view=diff
==============================================================================
--- incubator/qpid/trunk/qpid/java/client/src/main/java/org/apache/qpid/client/AMQBrokerDetails.java
(original)
+++ incubator/qpid/trunk/qpid/java/client/src/main/java/org/apache/qpid/client/AMQBrokerDetails.java
Thu Oct 23 11:55:08 2008
@@ -49,15 +49,7 @@
 
     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 @@
     {
         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;

Modified: incubator/qpid/trunk/qpid/java/client/src/test/java/org/apache/qpid/test/unit/client/BrokerDetails/BrokerDetailsTest.java
URL: http://svn.apache.org/viewvc/incubator/qpid/trunk/qpid/java/client/src/test/java/org/apache/qpid/test/unit/client/BrokerDetails/BrokerDetailsTest.java?rev=707443&r1=707442&r2=707443&view=diff
==============================================================================
--- incubator/qpid/trunk/qpid/java/client/src/test/java/org/apache/qpid/test/unit/client/BrokerDetails/BrokerDetailsTest.java
(original)
+++ incubator/qpid/trunk/qpid/java/client/src/test/java/org/apache/qpid/test/unit/client/BrokerDetails/BrokerDetailsTest.java
Thu Oct 23 11:55:08 2008
@@ -91,17 +91,6 @@
         }
 
     }
-    
-    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()
     {



Mime
View raw message