openjpa-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From allee8...@apache.org
Subject svn commit: r762177 - /openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/sql/DB2Dictionary.java
Date Sun, 05 Apr 2009 22:37:24 GMT
Author: allee8285
Date: Sun Apr  5 22:37:24 2009
New Revision: 762177

URL: http://svn.apache.org/viewvc?rev=762177&view=rev
Log:
OPENJPA-957 - Guard NPE as fetch may be null in getForUpdateClause.

Modified:
    openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/sql/DB2Dictionary.java

Modified: openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/sql/DB2Dictionary.java
URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/sql/DB2Dictionary.java?rev=762177&r1=762176&r2=762177&view=diff
==============================================================================
--- openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/sql/DB2Dictionary.java
(original)
+++ openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/sql/DB2Dictionary.java
Sun Apr  5 22:37:24 2009
@@ -350,7 +350,8 @@
         else
             isolationLevel = conf.getTransactionIsolationConstant();
 
-        if (fetch.getReadLockLevel() >= MixedLockLevels.LOCK_PESSIMISTIC_WRITE)
+        if (fetch != null
+            && fetch.getReadLockLevel() >= MixedLockLevels.LOCK_PESSIMISTIC_WRITE)
             isolationLevel = Connection.TRANSACTION_SERIALIZABLE;
 
         if (isForUpdate) {



Mime
View raw message