DriverManager.java patch

Ryan Heise ryan at whitewolf.com.au
Sat Sep 16 22:47:31 PDT 2000


Attached is a patch to DriverManager.java that allows a null
user/password to be passed into getConnection(). This is needed for
databases that don't require a user or password (eg. Enhydra InstantDB).

-- 
Ryan Heise

http://www.progsoc.uts.edu.au/~rheise/
-------------- next part --------------
Index: libraries/javalib/java/sql/DriverManager.java
===================================================================
RCS file: /cvs/kaffe/kaffe/libraries/javalib/java/sql/DriverManager.java,v
retrieving revision 1.2
diff -u -r1.2 DriverManager.java
--- libraries/javalib/java/sql/DriverManager.java	1999/03/10 08:31:31	1.2
+++ libraries/javalib/java/sql/DriverManager.java	2000/09/17 06:16:40
@@ -44,8 +44,10 @@
     
 public static synchronized Connection getConnection(String url, String user, String password) throws SQLException {
 	Properties p = new Properties();
-	p.put("user", user);
-	p.put("password", password);
+	if (user != null)
+		p.put("user", user);
+	if (password != null)
+		p.put("password", password);
 	return (getConnection(url, p));
 }
 


More information about the kaffe mailing list