diff options
Diffstat (limited to 'libjava/java/sql')
-rw-r--r-- | libjava/java/sql/DriverManager.java | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/libjava/java/sql/DriverManager.java b/libjava/java/sql/DriverManager.java index 19d4e9d..641bfe4 100644 --- a/libjava/java/sql/DriverManager.java +++ b/libjava/java/sql/DriverManager.java @@ -341,8 +341,10 @@ getConnection(String url, String user, String password) throws SQLException { Properties p = new Properties(); - p.setProperty("user", user); - p.setProperty("password", password); + if (user != null) + p.setProperty("user", user); + if (password != null) + p.setProperty("password", password); return(getConnection(url, p)); } |