db-derby-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From myrn...@apache.org
Subject svn commit: r547069 - /db/derby/code/trunk/java/tools/org/apache/derby/impl/tools/ij/util.java
Date Thu, 14 Jun 2007 00:23:54 GMT
Author: myrnavl
Date: Wed Jun 13 17:23:54 2007
New Revision: 547069

URL: http://svn.apache.org/viewvc?view=rev&rev=547069
Log:
DERBY-2733: prevent ij with J2ME from encountering a NullPointerException.

Modified:
    db/derby/code/trunk/java/tools/org/apache/derby/impl/tools/ij/util.java

Modified: db/derby/code/trunk/java/tools/org/apache/derby/impl/tools/ij/util.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/tools/org/apache/derby/impl/tools/ij/util.java?view=diff&rev=547069&r1=547068&r2=547069
==============================================================================
--- db/derby/code/trunk/java/tools/org/apache/derby/impl/tools/ij/util.java (original)
+++ db/derby/code/trunk/java/tools/org/apache/derby/impl/tools/ij/util.java Wed Jun 13 17:23:54
2007
@@ -511,6 +511,11 @@
 	    if (dsName == null)
 	    	return null;
 	    
+	    // if we have no URL at this point, we should not attempt to get a
+	    // connection. Just start ij without connection. 
+	    if (databaseURL == null && defaultURL == null)
+	    	return null;
+        
 	    //First connection - pass firstTime=true, dbName=null. For database name, 
 	    //value in ij.dataSource.databaseName will be used. 
 	    con = getDataSourceConnection(dsName,user,password,null,true);



Mime
View raw message