From 89aa2dcbe70954e8c83993cee306a910beae8844 Mon Sep 17 00:00:00 2001 From: Rajith Muditha Attapattu Date: Wed, 6 Mar 2013 21:04:51 +0000 Subject: 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 --- .../org/apache/qpid/client/transport/ClientConnectionDelegate.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'qpid/java/client/src/main') 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 + -- cgit v1.2.1