Index: src/interfaces/jdbc/org/postgresql/Driver.java.in =================================================================== RCS file: /projects/cvsroot/pgsql-server/src/interfaces/jdbc/org/postgresql/Driver.java.in,v retrieving revision 1.36 diff -c -r1.36 Driver.java.in *** src/interfaces/jdbc/org/postgresql/Driver.java.in 13 Sep 2003 04:02:12 -0000 1.36 --- src/interfaces/jdbc/org/postgresql/Driver.java.in 3 Nov 2003 10:41:48 -0000 *************** *** 111,117 **** * * Our protocol takes the forms: *
! 	 *	jdbc:org.postgresql://host:port/database?param1=val1&...
  	 * 
* * @param url the URL of the database to connect to --- 111,117 ---- * * Our protocol takes the forms: *
! 	 *	jdbc:postgresql://host:port/database?param1=val1&...
  	 * 
* * @param url the URL of the database to connect to *************** *** 163,169 **** * Returns true if the driver thinks it can open a connection to the * given URL. Typically, drivers will return true if they understand * the subprotocol specified in the URL and false if they don't. Our ! * protocols start with jdbc:org.postgresql: * * @see java.sql.Driver#acceptsURL * @param url the URL of the driver --- 163,169 ---- * Returns true if the driver thinks it can open a connection to the * given URL. Typically, drivers will return true if they understand * the subprotocol specified in the URL and false if they don't. Our ! * protocols start with jdbc:postgresql: * * @see java.sql.Driver#acceptsURL * @param url the URL of the driver *************** *** 286,292 **** //parse the server part of the url StringTokenizer st = new StringTokenizer(l_urlServer, ":/", true); ! for (int count = 0; (st.hasMoreTokens()); count++) { String token = st.nextToken(); --- 286,293 ---- //parse the server part of the url StringTokenizer st = new StringTokenizer(l_urlServer, ":/", true); ! int count; ! for (count = 0; (st.hasMoreTokens()); count++) { String token = st.nextToken(); *************** *** 357,362 **** --- 358,366 ---- } } } + if (count <= 1) { + return null; + } // if we extracted an IPv6 address out earlier put it back if (ipv6address != null) *************** *** 364,370 **** //parse the args part of the url StringTokenizer qst = new StringTokenizer(l_urlArgs, "&"); ! for (int count = 0; (qst.hasMoreTokens()); count++) { String token = qst.nextToken(); int l_pos = token.indexOf('='); --- 368,374 ---- //parse the args part of the url StringTokenizer qst = new StringTokenizer(l_urlArgs, "&"); ! for (count = 0; (qst.hasMoreTokens()); count++) { String token = qst.nextToken(); int l_pos = token.indexOf('=');