diff --git a/activemq-core/src/main/java/org/apache/activemq/thread/Scheduler.java b/activemq-core/src/main/java/org/apache/activemq/thread/Scheduler.java index afbff4cf22..2a41cdb13d 100755 --- a/activemq-core/src/main/java/org/apache/activemq/thread/Scheduler.java +++ b/activemq-core/src/main/java/org/apache/activemq/thread/Scheduler.java @@ -52,8 +52,8 @@ public class Scheduler { ScheduledFuture ticket = (ScheduledFuture) clockTickets.remove(task); if( ticket!=null ) { ticket.cancel(false); - if (ticket instanceof RunnableScheduledFuture) - clockDaemon.remove((RunnableScheduledFuture) ticket); + if (ticket instanceof Runnable) + clockDaemon.remove((Runnable) ticket); } }