summaryrefslogtreecommitdiff
path: root/qpid/java/client/src/main
diff options
context:
space:
mode:
authorRajith Muditha Attapattu <rajith@apache.org>2013-03-06 21:04:51 +0000
committerRajith Muditha Attapattu <rajith@apache.org>2013-03-06 21:04:51 +0000
commit89aa2dcbe70954e8c83993cee306a910beae8844 (patch)
tree01ca10c7057cce3803c54ca4e1da25b3fb8ac6e7 /qpid/java/client/src/main
parenta0a4fd7f3dafadcfd635c725de914367529fd7b3 (diff)
downloadqpid-python-89aa2dcbe70954e8c83993cee306a910beae8844.tar.gz
QPID-3396 Changed the test cases to relect that username and password
is optional. git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@1453559 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'qpid/java/client/src/main')
-rw-r--r--qpid/java/client/src/main/java/org/apache/qpid/client/transport/ClientConnectionDelegate.java3
1 files changed, 2 insertions, 1 deletions
diff --git a/qpid/java/client/src/main/java/org/apache/qpid/client/transport/ClientConnectionDelegate.java b/qpid/java/client/src/main/java/org/apache/qpid/client/transport/ClientConnectionDelegate.java
index 2775354acf..e9b946d5b7 100644
--- a/qpid/java/client/src/main/java/org/apache/qpid/client/transport/ClientConnectionDelegate.java
+++ b/qpid/java/client/src/main/java/org/apache/qpid/client/transport/ClientConnectionDelegate.java
@@ -98,7 +98,8 @@ public class ClientConnectionDelegate extends ClientDelegate
" Client restricted itself to : " + (restrictionList != null ? restrictionList : "no restriction"));
}
- if (CallbackHandlerRegistry.getInstance().isUserPassRequired(selectedMech))
+ if ((_connectionURL.getUsername() == null || _connectionURL.getPassword() == null)
+ && CallbackHandlerRegistry.getInstance().isUserPassRequired(selectedMech))
{
throw new ConnectionException("Username and Password is required for the selected mechanism : " + selectedMech +
" Broker allows : " + brokerMechanisms +