Author: kfujino Date: Mon Apr 3 06:10:00 2017 New Revision: 1789919 URL: http://svn.apache.org/viewvc?rev=1789919&view=rev Log: In StatementFacade, the method call on the statements that have been closed throw SQLException rather than NullPointerException.
Modified: tomcat/tc8.0.x/trunk/modules/jdbc-pool/src/main/java/org/apache/tomcat/jdbc/pool/StatementFacade.java tomcat/tc8.0.x/trunk/webapps/docs/changelog.xml Modified: tomcat/tc8.0.x/trunk/modules/jdbc-pool/src/main/java/org/apache/tomcat/jdbc/pool/StatementFacade.java URL: http://svn.apache.org/viewvc/tomcat/tc8.0.x/trunk/modules/jdbc-pool/src/main/java/org/apache/tomcat/jdbc/pool/StatementFacade.java?rev=1789919&r1=1789918&r2=1789919&view=diff ============================================================================== --- tomcat/tc8.0.x/trunk/modules/jdbc-pool/src/main/java/org/apache/tomcat/jdbc/pool/StatementFacade.java (original) +++ tomcat/tc8.0.x/trunk/modules/jdbc-pool/src/main/java/org/apache/tomcat/jdbc/pool/StatementFacade.java Mon Apr 3 06:10:00 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/tc8.0.x/trunk/webapps/docs/changelog.xml URL: http://svn.apache.org/viewvc/tomcat/tc8.0.x/trunk/webapps/docs/changelog.xml?rev=1789919&r1=1789918&r2=1789919&view=diff ============================================================================== --- tomcat/tc8.0.x/trunk/webapps/docs/changelog.xml (original) +++ tomcat/tc8.0.x/trunk/webapps/docs/changelog.xml Mon Apr 3 06:10:00 2017 @@ -60,6 +60,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-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org