empire-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From doeb...@apache.org
Subject svn commit: r1360566 - /empire-db/trunk/empire-db/src/main/java/org/apache/empire/db/DBDatabase.java
Date Thu, 12 Jul 2012 07:54:55 GMT
Author: doebele
Date: Thu Jul 12 07:54:55 2012
New Revision: 1360566

URL: http://svn.apache.org/viewvc?rev=1360566&view=rev
Log:
EMPIREDB-141
check connection parameter to avoid NullPointerException

Modified:
    empire-db/trunk/empire-db/src/main/java/org/apache/empire/db/DBDatabase.java

Modified: empire-db/trunk/empire-db/src/main/java/org/apache/empire/db/DBDatabase.java
URL: http://svn.apache.org/viewvc/empire-db/trunk/empire-db/src/main/java/org/apache/empire/db/DBDatabase.java?rev=1360566&r1=1360565&r2=1360566&view=diff
==============================================================================
--- empire-db/trunk/empire-db/src/main/java/org/apache/empire/db/DBDatabase.java (original)
+++ empire-db/trunk/empire-db/src/main/java/org/apache/empire/db/DBDatabase.java Thu Jul 12
07:54:55 2012
@@ -1146,7 +1146,10 @@ public abstract class DBDatabase extends
     {
         checkOpen();
         try 
-        {   // Debug
+        {   // Check argument
+            if (conn==null)
+                throw new InvalidArgumentException("conn", conn);
+            // Debug
             if (log.isInfoEnabled())
                 log.info("Executing: " + sqlCmd);
             // execute SQL
@@ -1200,7 +1203,10 @@ public abstract class DBDatabase extends
     {
         checkOpen();
         try
-        {   // Debug
+        {   // Check argument
+            if (conn==null)
+                throw new InvalidArgumentException("conn", conn);
+            // Debug
             if (log.isDebugEnabled())
     	        log.debug("Executing: " + sqlCmd);
             // Execute the Statement



Mime
View raw message