openjpa-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ppod...@apache.org
Subject svn commit: r942815 - /openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/schema/SimpleDriverDataSource.java
Date Mon, 10 May 2010 16:33:06 GMT
Author: ppoddar
Date: Mon May 10 16:33:06 2010
New Revision: 942815

URL: http://svn.apache.org/viewvc?rev=942815&view=rev
Log:
OPENJPA-1657: Save NPE for some database connect on null properties

Modified:
    openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/schema/SimpleDriverDataSource.java

Modified: openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/schema/SimpleDriverDataSource.java
URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/schema/SimpleDriverDataSource.java?rev=942815&r1=942814&r2=942815&view=diff
==============================================================================
--- openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/schema/SimpleDriverDataSource.java
(original)
+++ openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/schema/SimpleDriverDataSource.java
Mon May 10 16:33:06 2010
@@ -93,7 +93,8 @@ public abstract class SimpleDriverDataSo
 
     public Connection getConnection(Properties props)
         throws SQLException {
-    	Connection con = getDriver().connect(_connectionURL, props);
+    	Connection con = getDriver().connect(_connectionURL, props == null? new Properties()
: props);
+    	
     	if (con == null) {
             throw new SQLException(_eloc.get("poolds-null",
                     _connectionDriverName, _connectionURL).getMessage());



Mime
View raw message