This is an automated email from the ASF dual-hosted git repository. kfujino pushed a commit to branch 8.5.x in repository https://gitbox.apache.org/repos/asf/tomcat.git
The following commit(s) were added to refs/heads/8.5.x by this push: new 7fc16d1 Fix https://bz.apache.org/bugzilla/show_bug.cgi?id=63320 Ensure that StatementCache caches statements that include arrays in arguments. 7fc16d1 is described below commit 7fc16d19d3aa54f4d67a3185af19195792d22f9c Author: KeiichiFujino <kfuj...@apache.org> AuthorDate: Tue Apr 9 16:15:59 2019 +0900 Fix https://bz.apache.org/bugzilla/show_bug.cgi?id=63320 Ensure that StatementCache caches statements that include arrays in arguments. --- .../org/apache/tomcat/jdbc/pool/interceptor/StatementCache.java | 4 ++-- webapps/docs/changelog.xml | 8 ++++++++ 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/modules/jdbc-pool/src/main/java/org/apache/tomcat/jdbc/pool/interceptor/StatementCache.java b/modules/jdbc-pool/src/main/java/org/apache/tomcat/jdbc/pool/interceptor/StatementCache.java index 15d0e49..03b7f84 100644 --- a/modules/jdbc-pool/src/main/java/org/apache/tomcat/jdbc/pool/interceptor/StatementCache.java +++ b/modules/jdbc-pool/src/main/java/org/apache/tomcat/jdbc/pool/interceptor/StatementCache.java @@ -359,7 +359,7 @@ public class StatementCache extends StatementDecoratorInterceptor implements Sta public int hashCode() { final int prime = 31; int result = 1; - result = prime * result + Arrays.hashCode(args); + result = prime * result + Arrays.deepHashCode(args); result = prime * result + ((stmtType == null) ? 0 : stmtType.hashCode()); return result; @@ -374,7 +374,7 @@ public class StatementCache extends StatementDecoratorInterceptor implements Sta if (getClass() != obj.getClass()) return false; CacheKey other = (CacheKey) obj; - if (!Arrays.equals(args, other.args)) + if (!Arrays.deepEquals(args, other.args)) return false; if (stmtType == null) { if (other.stmtType != null) diff --git a/webapps/docs/changelog.xml b/webapps/docs/changelog.xml index 13df265..03c1f53 100644 --- a/webapps/docs/changelog.xml +++ b/webapps/docs/changelog.xml @@ -161,6 +161,14 @@ </add> </changelog> </subsection> + <subsection name="jdbc-pool"> + <changelog> + <fix> + <bug>63320</bug>: Ensure that <code>StatementCache</code> caches + statements that include arrays in arguments. (kfujino) + </fix> + </changelog> + </subsection> </section> <section name="Tomcat 8.5.39 (markt)" rtext="2019-03-19"> <subsection name="Catalina"> --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org