qpid-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rob...@apache.org
Subject svn commit: r1463142 - in /qpid/trunk/qpid/java/broker/src: main/java/org/apache/qpid/server/model/adapter/PortFactory.java test/java/org/apache/qpid/server/model/adapter/PortFactoryTest.java
Date Mon, 01 Apr 2013 14:19:21 GMT
Author: robbie
Date: Mon Apr  1 14:19:21 2013
New Revision: 1463142

URL: http://svn.apache.org/r1463142
Log:
QPID-4657, QPID-4683: review changes

Modified:
    qpid/trunk/qpid/java/broker/src/main/java/org/apache/qpid/server/model/adapter/PortFactory.java
    qpid/trunk/qpid/java/broker/src/test/java/org/apache/qpid/server/model/adapter/PortFactoryTest.java

Modified: qpid/trunk/qpid/java/broker/src/main/java/org/apache/qpid/server/model/adapter/PortFactory.java
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/java/broker/src/main/java/org/apache/qpid/server/model/adapter/PortFactory.java?rev=1463142&r1=1463141&r2=1463142&view=diff
==============================================================================
--- qpid/trunk/qpid/java/broker/src/main/java/org/apache/qpid/server/model/adapter/PortFactory.java
(original)
+++ qpid/trunk/qpid/java/broker/src/main/java/org/apache/qpid/server/model/adapter/PortFactory.java
Mon Apr  1 14:19:21 2013
@@ -108,13 +108,12 @@ public class PortFactory
             boolean useClientAuth = (Boolean) port.getAttribute(Port.NEED_CLIENT_AUTH) ||
(Boolean) port.getAttribute(Port.WANT_CLIENT_AUTH);
             if(useClientAuth && broker.getTrustStores().isEmpty())
             {
-                throw new IllegalConfigurationException("Cant create port which requests
SSL client certificates as the broker has no trust/peer stores configured.");
+                throw new IllegalConfigurationException("Can't create port which requests
SSL client certificates as the broker has no trust/peer stores configured.");
             }
 
-            boolean doesntUseSSL = port.getTransports().isEmpty() || !port.getTransports().contains(Transport.SSL);
-            if(useClientAuth && doesntUseSSL)
+            if(useClientAuth && !port.getTransports().contains(Transport.SSL))
             {
-                throw new IllegalConfigurationException("Cant create port which requests
SSL client certificates but doesnt use SSL transport.");
+                throw new IllegalConfigurationException("Can't create port which requests
SSL client certificates but doesnt use SSL transport.");
             }
         }
         else

Modified: qpid/trunk/qpid/java/broker/src/test/java/org/apache/qpid/server/model/adapter/PortFactoryTest.java
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/java/broker/src/test/java/org/apache/qpid/server/model/adapter/PortFactoryTest.java?rev=1463142&r1=1463141&r2=1463142&view=diff
==============================================================================
--- qpid/trunk/qpid/java/broker/src/test/java/org/apache/qpid/server/model/adapter/PortFactoryTest.java
(original)
+++ qpid/trunk/qpid/java/broker/src/test/java/org/apache/qpid/server/model/adapter/PortFactoryTest.java
Mon Apr  1 14:19:21 2013
@@ -151,7 +151,7 @@ public class PortFactoryTest extends Qpi
         }
     }
 
-    public void testCreateAmqpPortUsingSsslSucceedsWithKeyStore()
+    public void testCreateAmqpPortUsingSslSucceedsWithKeyStore()
     {
         when(_broker.getKeyStores()).thenReturn(Collections.singleton(_keyStore));
 



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@qpid.apache.org
For additional commands, e-mail: commits-help@qpid.apache.org


Mime
View raw message