diff --git a/appserver/payara-appserver-modules/hazelcast-ejb-timer/src/main/java/fish/payara/ejb/timer/hazelcast/HazelcastTimerStore.java b/appserver/payara-appserver-modules/hazelcast-ejb-timer/src/main/java/fish/payara/ejb/timer/hazelcast/HazelcastTimerStore.java index f1626f288a2..df388982574 100644 --- a/appserver/payara-appserver-modules/hazelcast-ejb-timer/src/main/java/fish/payara/ejb/timer/hazelcast/HazelcastTimerStore.java +++ b/appserver/payara-appserver-modules/hazelcast-ejb-timer/src/main/java/fish/payara/ejb/timer/hazelcast/HazelcastTimerStore.java @@ -1,7 +1,7 @@ /* * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. * - * Copyright (c) 2016-2019 Payara Foundation and/or its affiliates. All rights reserved. + * Copyright (c) 2016-2020 Payara Foundation and/or its affiliates. All rights reserved. * * The contents of this file are subject to the terms of either the GNU * General Public License Version 2 only ("GPL") or the Common Development @@ -275,7 +275,7 @@ protected void cancelTimersByKey(long containerId, Object primaryKey) { if (timers != null) { HashSet timersToCancel = new HashSet<>(); for (TimerPrimaryKey timer : timers) { - HZTimer hzTimer = pkCache.get(((TimerPrimaryKey)primaryKey).timerId); + HZTimer hzTimer = pkCache.get(timer.timerId); if (hzTimer != null && hzTimer.getTimedObjectPk().equals(primaryKey)) { timersToCancel.add(hzTimer); }