HHH-10182 Backport HHH-7898 for JTA environment only

* fixed possible NPE
This commit is contained in:
Radim Vansa 2015-10-16 14:12:49 +02:00 committed by Gail Badner
parent 5d74afbc2d
commit dbb30213ed
1 changed files with 3 additions and 1 deletions

View File

@ -94,7 +94,9 @@ public class QueryResultsRegionImpl extends BaseTransactionalDataRegion implemen
public void evict(Object key) throws CacheException {
for (Map<Object, PostTransactionQueryUpdate> map : transactionContext.values()) {
PostTransactionQueryUpdate update = map.remove(key);
update.setValue(null);
if (update != null) {
update.setValue(null);
}
}
evictCache.remove( key );
}