summaryrefslogtreecommitdiff
path: root/java
diff options
context:
space:
mode:
authorRobert Gemmell <robbie@apache.org>2013-04-01 14:19:21 +0000
committerRobert Gemmell <robbie@apache.org>2013-04-01 14:19:21 +0000
commitfaf8f1523e934f24d7d856d03d56622155f6a4a6 (patch)
tree0d4964def9b743fc5d602a494e6e46f5974b23d3 /java
parent7f45c27cf8eec8e4ee381ed01c7b33544cefce47 (diff)
downloadqpid-python-faf8f1523e934f24d7d856d03d56622155f6a4a6.tar.gz
QPID-4657, QPID-4683: review changes
git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@1463142 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'java')
-rw-r--r--java/broker/src/main/java/org/apache/qpid/server/model/adapter/PortFactory.java7
-rw-r--r--java/broker/src/test/java/org/apache/qpid/server/model/adapter/PortFactoryTest.java2
2 files changed, 4 insertions, 5 deletions
diff --git a/java/broker/src/main/java/org/apache/qpid/server/model/adapter/PortFactory.java b/java/broker/src/main/java/org/apache/qpid/server/model/adapter/PortFactory.java
index 50bb2e2fcb..d5455bdb25 100644
--- a/java/broker/src/main/java/org/apache/qpid/server/model/adapter/PortFactory.java
+++ b/java/broker/src/main/java/org/apache/qpid/server/model/adapter/PortFactory.java
@@ -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
diff --git a/java/broker/src/test/java/org/apache/qpid/server/model/adapter/PortFactoryTest.java b/java/broker/src/test/java/org/apache/qpid/server/model/adapter/PortFactoryTest.java
index 5d9cfea709..a9303c264e 100644
--- a/java/broker/src/test/java/org/apache/qpid/server/model/adapter/PortFactoryTest.java
+++ b/java/broker/src/test/java/org/apache/qpid/server/model/adapter/PortFactoryTest.java
@@ -151,7 +151,7 @@ public class PortFactoryTest extends QpidTestCase
}
}
- public void testCreateAmqpPortUsingSsslSucceedsWithKeyStore()
+ public void testCreateAmqpPortUsingSslSucceedsWithKeyStore()
{
when(_broker.getKeyStores()).thenReturn(Collections.singleton(_keyStore));