From: fhanik Date: Fri, 13 Nov 2009 20:12:32 +0000 (+0000) Subject: Use a safe default of the useEquals, works on any VM. X-Git-Url: https://git.internetallee.de/?a=commitdiff_plain;h=a60f8544d1a1e5de8b1ab99ae0973a863891a621;p=tomcat7.0 Use a safe default of the useEquals, works on any VM. git-svn-id: https://svn.apache.org/repos/asf/tomcat/trunk@835974 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/modules/jdbc-pool/doc/jdbc-pool.xml b/modules/jdbc-pool/doc/jdbc-pool.xml index 8c76a9a00..c692de9a2 100644 --- a/modules/jdbc-pool/doc/jdbc-pool.xml +++ b/modules/jdbc-pool/doc/jdbc-pool.xml @@ -383,9 +383,9 @@ -

(boolean) Set to true if you wish the ProxyConnection class to use String.equals instead of - == when comparing method names. This property does not apply to added interceptors as those are configured individually. - The default value is false. +

(boolean) Set to true if you wish the ProxyConnection class to use String.equals and set to false + when you wish to use == when comparing method names. This property does not apply to added interceptors as those are configured individually. + The default value is true.

@@ -426,9 +426,9 @@

Abstract base class for all interceptors, can not be instantiated.

-

(String as boolean) Set to true if you wish the interceptor class to use String.equals instead of - == when comparing method names. This property does not apply to added interceptors as those are configured individually. - The default value is false. +

(boolean) Set to true if you wish the ProxyConnection class to use String.equals and set to false + when you wish to use == when comparing method names. + The default value is true.

diff --git a/modules/jdbc-pool/java/org/apache/tomcat/jdbc/pool/JdbcInterceptor.java b/modules/jdbc-pool/java/org/apache/tomcat/jdbc/pool/JdbcInterceptor.java index 78a214a55..71311bf08 100644 --- a/modules/jdbc-pool/java/org/apache/tomcat/jdbc/pool/JdbcInterceptor.java +++ b/modules/jdbc-pool/java/org/apache/tomcat/jdbc/pool/JdbcInterceptor.java @@ -65,7 +65,7 @@ public abstract class JdbcInterceptor implements InvocationHandler { /** * Property that decides how we do string comparison, default is reference (==) */ - private boolean useEquals = false; + private boolean useEquals = true; /** * Public constructor for instantation through reflection diff --git a/modules/jdbc-pool/java/org/apache/tomcat/jdbc/pool/PoolProperties.java b/modules/jdbc-pool/java/org/apache/tomcat/jdbc/pool/PoolProperties.java index 6fad3a379..0f5661705 100644 --- a/modules/jdbc-pool/java/org/apache/tomcat/jdbc/pool/PoolProperties.java +++ b/modules/jdbc-pool/java/org/apache/tomcat/jdbc/pool/PoolProperties.java @@ -69,7 +69,7 @@ public class PoolProperties implements PoolConfiguration { protected boolean testOnConnect =false; protected String jdbcInterceptors=null; protected boolean fairQueue = true; - protected boolean useEquals = false; + protected boolean useEquals = true; protected int abandonWhenPercentageFull = 0; protected long maxAge = 0; protected boolean useLock = false;