DriverManager.java (getConnection): Don't set user/password properties if null.

2000-12-27  Jeff Sturm  <jeff.sturm@commerceone.com>

	* java/sql/DriverManager.java (getConnection): Don't set
	user/password properties if null.

From-SVN: r38516
This commit is contained in:
Jeff Sturm 2000-12-28 22:21:36 +00:00 committed by Bryce McKinlay
parent 347d73aac2
commit 4c58589f1a
2 changed files with 9 additions and 2 deletions

View File

@ -1,3 +1,8 @@
2000-12-27 Jeff Sturm <jeff.sturm@commerceone.com>
* java/sql/DriverManager.java (getConnection): Don't set user/password
properties if null.
2000-12-27 Warren Levy <warrenl@redhat.com>
Fix for PR libgcj/1358:

View File

@ -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));
}