From 75c568012b06c52be8d81c64268eeeb700234365 Mon Sep 17 00:00:00 2001 From: James Strachan Date: Tue, 1 May 2007 12:51:47 +0000 Subject: [PATCH] Amended patch for AMQ-1235 to not depend on Java 6 git-svn-id: https://svn.apache.org/repos/asf/activemq/trunk@534046 13f79535-47bb-0310-9956-ffa450edef68 --- .../src/main/java/org/apache/activemq/thread/Scheduler.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) 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 c6cf95067f..c1c9b048fe 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 @@ -51,8 +51,9 @@ 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); } }