[jboss-cvs] JBossAS SVN: r114685 - branches/JBPAPP_5_1_1_GA_JBPAPP-10980/server/src/main/org/jboss/ejb/txtimer.
jboss-cvs-commits at lists.jboss.org
jboss-cvs-commits at lists.jboss.org
Mon Feb 3 16:53:33 EST 2014
Author: bmaxwell
Date: 2014-02-03 16:53:33 -0500 (Mon, 03 Feb 2014)
New Revision: 114685
Modified:
branches/JBPAPP_5_1_1_GA_JBPAPP-10980/server/src/main/org/jboss/ejb/txtimer/TimerImpl.java
Log:
[JBPAPP-10980] fix NPE when cancelling timer within same tx
Modified: branches/JBPAPP_5_1_1_GA_JBPAPP-10980/server/src/main/org/jboss/ejb/txtimer/TimerImpl.java
===================================================================
--- branches/JBPAPP_5_1_1_GA_JBPAPP-10980/server/src/main/org/jboss/ejb/txtimer/TimerImpl.java 2014-02-03 21:52:57 UTC (rev 114684)
+++ branches/JBPAPP_5_1_1_GA_JBPAPP-10980/server/src/main/org/jboss/ejb/txtimer/TimerImpl.java 2014-02-03 21:53:33 UTC (rev 114685)
@@ -259,7 +259,9 @@
if (timerState != EXPIRED)
setTimerState(CANCELED);
timerService.removeTimer(this);
- scheduledFuture.cancel(false);
+ // if started within a tx there is no future yet
+ if (scheduledFuture != null)
+ scheduledFuture.cancel(false);
}
/**
More information about the jboss-cvs-commits
mailing list