db-derby-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rhille...@apache.org
Subject svn commit: r1466522 - /db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/catalog/DataDictionaryImpl.java
Date Wed, 10 Apr 2013 15:37:25 GMT
Author: rhillegas
Date: Wed Apr 10 15:37:25 2013
New Revision: 1466522

URL: http://svn.apache.org/r1466522
Log:
DERBY-6137: Cleanup cache manager usage by SYSCS_UTIL.SYSCS_PEEK_AT_SEQUENCE.

Modified:
    db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/catalog/DataDictionaryImpl.java

Modified: db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/catalog/DataDictionaryImpl.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/catalog/DataDictionaryImpl.java?rev=1466522&r1=1466521&r2=1466522&view=diff
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/catalog/DataDictionaryImpl.java
(original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/catalog/DataDictionaryImpl.java
Wed Apr 10 15:37:25 2013
@@ -10505,7 +10505,19 @@ public final class	DataDictionaryImpl
                     ( schemaName + "." + sequenceName) );
         }
         
-        return ((SequenceUpdater) sequenceGeneratorCache.find( uuid )).peekAtCurrentValue();
+        SequenceUpdater sequenceUpdater = null;
+
+        try {
+            sequenceUpdater = (SequenceUpdater) sequenceGeneratorCache.find( uuid );
+            return sequenceUpdater.peekAtCurrentValue();
+        }
+        finally
+        {
+            if ( sequenceUpdater != null )
+            {
+                sequenceGeneratorCache.release( sequenceUpdater );
+            }
+        }
     }
     
     public RowLocation getRowLocationTemplate(LanguageConnectionContext lcc,



Mime
View raw message