Author: manik.surtani(a)jboss.com
Date: 2008-01-02 18:09:38 -0500 (Wed, 02 Jan 2008)
New Revision: 4948
Modified:
core/trunk/src/main/java/org/jboss/cache/interceptors/TxInterceptor.java
Log:
Added null check
Modified: core/trunk/src/main/java/org/jboss/cache/interceptors/TxInterceptor.java
===================================================================
--- core/trunk/src/main/java/org/jboss/cache/interceptors/TxInterceptor.java 2008-01-02
19:37:27 UTC (rev 4947)
+++ core/trunk/src/main/java/org/jboss/cache/interceptors/TxInterceptor.java 2008-01-02
23:09:38 UTC (rev 4948)
@@ -1195,7 +1195,9 @@
ctx = cache.getInvocationContext();
}
- if (ctx.isOptionsUninitialised() && entry.getOption() != null)
+ entry = txTable.get(gtx);
+
+ if (ctx.isOptionsUninitialised() && entry != null &&
entry.getOption() != null)
{
// use the options from the transaction entry instead
ctx.setOptionOverrides(entry.getOption());
@@ -1218,7 +1220,7 @@
if (log.isTraceEnabled()) log.trace("calling aftercompletion for "
+ gtx);
// set any transaction wide options as current for this thread.
- if ((entry = txTable.get(gtx)) != null)
+ if (entry != null)
{
modifications = entry.getModifications();
ctx.setOptionOverrides(entry.getOption());