You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by ma...@apache.org on 2016/12/05 11:46:20 UTC

svn commit: r1772647 - /tomcat/tc8.5.x/trunk/modules/jdbc-pool/src/main/java/org/apache/tomcat/jdbc/pool/interceptor/StatementCache.java

Author: markt
Date: Mon Dec  5 11:46:20 2016
New Revision: 1772647

URL: http://svn.apache.org/viewvc?rev=1772647&view=rev
Log:
Fix FindBugs warning. Previous code would always return null so simplify it.

Modified:
    tomcat/tc8.5.x/trunk/modules/jdbc-pool/src/main/java/org/apache/tomcat/jdbc/pool/interceptor/StatementCache.java

Modified: tomcat/tc8.5.x/trunk/modules/jdbc-pool/src/main/java/org/apache/tomcat/jdbc/pool/interceptor/StatementCache.java
URL: http://svn.apache.org/viewvc/tomcat/tc8.5.x/trunk/modules/jdbc-pool/src/main/java/org/apache/tomcat/jdbc/pool/interceptor/StatementCache.java?rev=1772647&r1=1772646&r2=1772647&view=diff
==============================================================================
--- tomcat/tc8.5.x/trunk/modules/jdbc-pool/src/main/java/org/apache/tomcat/jdbc/pool/interceptor/StatementCache.java (original)
+++ tomcat/tc8.5.x/trunk/modules/jdbc-pool/src/main/java/org/apache/tomcat/jdbc/pool/interceptor/StatementCache.java Mon Dec  5 11:46:20 2016
@@ -186,7 +186,7 @@ public class StatementCache extends Stat
     }
 
     /**
-     * @param sql The SQL to attempt to match to entires in the statement cache
+     * @param sql The SQL to attempt to match to entries in the statement cache
      *
      * @return The CachedStatement for the given SQL
      *
@@ -194,10 +194,7 @@ public class StatementCache extends Stat
      */
     @Deprecated
     public CachedStatement isCached(String sql) {
-        @SuppressWarnings("unchecked")
-        ConcurrentHashMap<CacheKey,CachedStatement> cache =
-            (ConcurrentHashMap<CacheKey,CachedStatement>)pcon.getAttributes().get(STATEMENT_CACHE_ATTR);
-        return cache.get(sql);
+        return null;
     }
 
     public CachedStatement isCached(Method method, Object[] args) {



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