db-derby-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From krist...@apache.org
Subject svn commit: r629457 - /db/derby/code/trunk/java/client/org/apache/derby/client/am/stmtcache/JDBCStatementCache.java
Date Wed, 20 Feb 2008 13:53:08 GMT
Author: kristwaa
Date: Wed Feb 20 05:53:05 2008
New Revision: 629457

URL: http://svn.apache.org/viewvc?rev=629457&view=rev
Log:
DERBY-3324: JDBC statement cache implementation.
Added a check for null reference when evicting an entry.
Patch file: n/a

Modified:
    db/derby/code/trunk/java/client/org/apache/derby/client/am/stmtcache/JDBCStatementCache.java

Modified: db/derby/code/trunk/java/client/org/apache/derby/client/am/stmtcache/JDBCStatementCache.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/client/org/apache/derby/client/am/stmtcache/JDBCStatementCache.java?rev=629457&r1=629456&r2=629457&view=diff
==============================================================================
--- db/derby/code/trunk/java/client/org/apache/derby/client/am/stmtcache/JDBCStatementCache.java
(original)
+++ db/derby/code/trunk/java/client/org/apache/derby/client/am/stmtcache/JDBCStatementCache.java
Wed Feb 20 05:53:05 2008
@@ -148,7 +148,7 @@
          */
         protected boolean removeEldestEntry(Map.Entry eldest) {
             final boolean remove = size() > maxSize;
-            if (remove) {
+            if (remove && eldest != null) {
                 try {
                     ((PreparedStatement)eldest.getValue()).close();
                 } catch (SQLException ex) {



Mime
View raw message