summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStefan Winkler2009-05-26 12:03:24 (EDT)
committerStefan Winkler2009-05-26 12:03:24 (EDT)
commit317d542df9839780b014f7e6c20e9c655371e15e (patch)
tree000e3a883d268d2c2173f5f61ff96b45e2cfdd2b
parentd602565ba8c1ab6eb6620f96d600c8952f4213ce (diff)
downloadcdo-317d542df9839780b014f7e6c20e9c655371e15e.zip
cdo-317d542df9839780b014f7e6c20e9c655371e15e.tar.gz
cdo-317d542df9839780b014f7e6c20e9c655371e15e.tar.bz2
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
-rw-r--r--plugins/org.eclipse.emf.cdo.server.db/src/org/eclipse/emf/cdo/server/internal/db/SmartPreparedStatementCache.java6
1 files changed, 6 insertions, 0 deletions
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 de238a2..e3cbf56 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);
}