[jboss-cvs] JBossAS SVN: r112639 - branches/JBPAPP_5_1/server/src/main/org/jboss/ejb/txtimer.
jboss-cvs-commits at lists.jboss.org
jboss-cvs-commits at lists.jboss.org
Mon Feb 13 08:36:16 EST 2012
Author: wolfc
Date: 2012-02-13 08:36:15 -0500 (Mon, 13 Feb 2012)
New Revision: 112639
Modified:
branches/JBPAPP_5_1/server/src/main/org/jboss/ejb/txtimer/TimerImpl.java
Log:
JBPAPP-8035: fix NPE when cancelling timer within same tx
Modified: branches/JBPAPP_5_1/server/src/main/org/jboss/ejb/txtimer/TimerImpl.java
===================================================================
--- branches/JBPAPP_5_1/server/src/main/org/jboss/ejb/txtimer/TimerImpl.java 2012-02-13 10:53:00 UTC (rev 112638)
+++ branches/JBPAPP_5_1/server/src/main/org/jboss/ejb/txtimer/TimerImpl.java 2012-02-13 13:36:15 UTC (rev 112639)
@@ -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