You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@qpid.apache.org by ar...@apache.org on 2008/04/17 11:20:30 UTC

svn commit: r649016 - /incubator/qpid/trunk/qpid/java/client/src/main/java/org/apache/qpid/client/AMQBrokerDetails.java

Author: arnaudsimon
Date: Thu Apr 17 02:20:24 2008
New Revision: 649016

URL: http://svn.apache.org/viewvc?rev=649016&view=rev
Log:
QPID-919 Changed AMQBrokerDetails to throw an URL exception when the port number is not specified.

Modified:
    incubator/qpid/trunk/qpid/java/client/src/main/java/org/apache/qpid/client/AMQBrokerDetails.java

Modified: incubator/qpid/trunk/qpid/java/client/src/main/java/org/apache/qpid/client/AMQBrokerDetails.java
URL: http://svn.apache.org/viewvc/incubator/qpid/trunk/qpid/java/client/src/main/java/org/apache/qpid/client/AMQBrokerDetails.java?rev=649016&r1=649015&r2=649016&view=diff
==============================================================================
--- incubator/qpid/trunk/qpid/java/client/src/main/java/org/apache/qpid/client/AMQBrokerDetails.java (original)
+++ incubator/qpid/trunk/qpid/java/client/src/main/java/org/apache/qpid/client/AMQBrokerDetails.java Thu Apr 17 02:20:24 2008
@@ -119,6 +119,13 @@
                     int end = start;
                     boolean looking = true;
                     boolean found = false;
+                    // Throw an URL exception if the port number is not specified
+                    if (start == auth.length())
+                    {
+                        throw URLHelper.parseError(connection.toString().indexOf(auth) + end - 1,
+                                connection.toString().indexOf(auth) + end, "Port number must be specified",
+                                connection.toString());
+                    }
                     //Walk the authority looking for a port value.
                     while (looking)
                     {