tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kfuj...@apache.org
Subject svn commit: r1789917 - in /tomcat/trunk: modules/jdbc-pool/src/main/java/org/apache/tomcat/jdbc/pool/StatementFacade.java webapps/docs/changelog.xml
Date Mon, 03 Apr 2017 06:07:57 GMT
Author: kfujino
Date: Mon Apr  3 06:07:57 2017
New Revision: 1789917

URL: http://svn.apache.org/viewvc?rev=1789917&view=rev
Log:
In StatementFacade, the method call on the statements that have been closed throw SQLException
rather than NullPointerException.

Modified:
    tomcat/trunk/modules/jdbc-pool/src/main/java/org/apache/tomcat/jdbc/pool/StatementFacade.java
    tomcat/trunk/webapps/docs/changelog.xml

Modified: tomcat/trunk/modules/jdbc-pool/src/main/java/org/apache/tomcat/jdbc/pool/StatementFacade.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/modules/jdbc-pool/src/main/java/org/apache/tomcat/jdbc/pool/StatementFacade.java?rev=1789917&r1=1789916&r2=1789917&view=diff
==============================================================================
--- tomcat/trunk/modules/jdbc-pool/src/main/java/org/apache/tomcat/jdbc/pool/StatementFacade.java
(original)
+++ tomcat/trunk/modules/jdbc-pool/src/main/java/org/apache/tomcat/jdbc/pool/StatementFacade.java
Mon Apr  3 06:07:57 2017
@@ -25,6 +25,7 @@ import java.lang.reflect.Method;
 import java.lang.reflect.Proxy;
 import java.sql.CallableStatement;
 import java.sql.PreparedStatement;
+import java.sql.SQLException;
 import java.sql.Statement;
 
 import org.apache.juli.logging.Log;
@@ -106,7 +107,7 @@ public class StatementFacade extends Abs
             if (compare(ISCLOSED_VAL, method)) {
                 if (delegate == null) return Boolean.TRUE;
             }
-
+            if (delegate == null) throw new SQLException("Statement closed.");
             Object result =  null;
             try {
                 //invoke next

Modified: tomcat/trunk/webapps/docs/changelog.xml
URL: http://svn.apache.org/viewvc/tomcat/trunk/webapps/docs/changelog.xml?rev=1789917&r1=1789916&r2=1789917&view=diff
==============================================================================
--- tomcat/trunk/webapps/docs/changelog.xml (original)
+++ tomcat/trunk/webapps/docs/changelog.xml Mon Apr  3 06:07:57 2017
@@ -73,6 +73,11 @@
         Refactor the creating a constructor for a proxy class to reduce
         duplicate code. (kfujino)
       </scode>
+      <fix>
+        In <code>StatementFacade</code>, the method call on the statements that
+        have been closed throw <code>SQLException</code> rather than
+        <code>NullPointerException</code>. (kfujino)
+      </fix>
     </changelog>
   </subsection>
   <subsection name="Other">



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


Mime
View raw message