You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@qpid.apache.org by ra...@apache.org on 2013/03/06 22:04:51 UTC
svn commit: r1453559 - in /qpid/trunk/qpid/java/client/src:
main/java/org/apache/qpid/client/transport/ClientConnectionDelegate.java
test/java/org/apache/qpid/test/unit/client/connectionurl/ConnectionURLTest.java
Author: rajith
Date: Wed Mar 6 21:04:51 2013
New Revision: 1453559
URL: http://svn.apache.org/r1453559
Log:
QPID-3396 Changed the test cases to relect that username and password
is optional.
Modified:
qpid/trunk/qpid/java/client/src/main/java/org/apache/qpid/client/transport/ClientConnectionDelegate.java
qpid/trunk/qpid/java/client/src/test/java/org/apache/qpid/test/unit/client/connectionurl/ConnectionURLTest.java
Modified: qpid/trunk/qpid/java/client/src/main/java/org/apache/qpid/client/transport/ClientConnectionDelegate.java
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/java/client/src/main/java/org/apache/qpid/client/transport/ClientConnectionDelegate.java?rev=1453559&r1=1453558&r2=1453559&view=diff
==============================================================================
--- qpid/trunk/qpid/java/client/src/main/java/org/apache/qpid/client/transport/ClientConnectionDelegate.java (original)
+++ qpid/trunk/qpid/java/client/src/main/java/org/apache/qpid/client/transport/ClientConnectionDelegate.java Wed Mar 6 21:04:51 2013
@@ -98,7 +98,8 @@ public class ClientConnectionDelegate ex
" 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 +
Modified: qpid/trunk/qpid/java/client/src/test/java/org/apache/qpid/test/unit/client/connectionurl/ConnectionURLTest.java
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/java/client/src/test/java/org/apache/qpid/test/unit/client/connectionurl/ConnectionURLTest.java?rev=1453559&r1=1453558&r2=1453559&view=diff
==============================================================================
--- qpid/trunk/qpid/java/client/src/test/java/org/apache/qpid/test/unit/client/connectionurl/ConnectionURLTest.java (original)
+++ qpid/trunk/qpid/java/client/src/test/java/org/apache/qpid/test/unit/client/connectionurl/ConnectionURLTest.java Wed Mar 6 21:04:51 2013
@@ -384,11 +384,10 @@ public class ConnectionURLTest extends T
try
{
new AMQConnectionURL(url);
- fail("URL Should not parse");
}
catch (URLSyntaxException urise)
{
- assertTrue(urise.getMessage().startsWith("User information not found on url"));
+ fail("User information is optional in url");
}
}
@@ -400,11 +399,10 @@ public class ConnectionURLTest extends T
try
{
new AMQConnectionURL(url);
- fail("URL Should not parse");
}
catch (URLSyntaxException urise)
{
- assertTrue(urise.getMessage().startsWith("User information not found on url"));
+ fail("User information is optional in url");
}
}
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@qpid.apache.org
For additional commands, e-mail: commits-help@qpid.apache.org