From 317d542df9839780b014f7e6c20e9c655371e15e Mon Sep 17 00:00:00 2001 From: Stefan Winkler Date: Tue, 26 May 2009 16:03:24 +0000 Subject: small fix which makes the cascading NPE in SmartPreparedStatementCache.releaseCachedStatement go away. [276926] [DB] A lock could not be obtained within the time requested https://bugs.eclipse.org/bugs/show_bug.cgi?id=276926 --- .../emf/cdo/server/internal/db/SmartPreparedStatementCache.java | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/plugins/org.eclipse.emf.cdo.server.db/src/org/eclipse/emf/cdo/server/internal/db/SmartPreparedStatementCache.java b/plugins/org.eclipse.emf.cdo.server.db/src/org/eclipse/emf/cdo/server/internal/db/SmartPreparedStatementCache.java index de238a227d..e3cbf56972 100644 --- a/plugins/org.eclipse.emf.cdo.server.db/src/org/eclipse/emf/cdo/server/internal/db/SmartPreparedStatementCache.java +++ b/plugins/org.eclipse.emf.cdo.server.db/src/org/eclipse/emf/cdo/server/internal/db/SmartPreparedStatementCache.java @@ -51,6 +51,12 @@ public class SmartPreparedStatementCache extends AbstractPreparedStatementCache public void releasePreparedStatement(PreparedStatement ps) { + if (ps == null) + { + // Bug 276926 + // silently accept ps == null and do nothing. + return; + } CachedPreparedStatement cachedStatement = checkedOut.remove(ps); cache.put(cachedStatement); } -- cgit v1.2.3