OPENJPA-957 - Guard NPE as fetch may be null in getForUpdateClause.

git-svn-id: https://svn.apache.org/repos/asf/openjpa/trunk@762177 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Albert Lee 2009-04-05 22:37:24 +00:00
parent 718370e1ef
commit bb01292ce9
1 changed files with 2 additions and 1 deletions

View File

@ -350,7 +350,8 @@ public class DB2Dictionary
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) {