From 8031d77f984e4d3c54782dd4934f48b35cf16c00 Mon Sep 17 00:00:00 2001 From: Timothy Bish Date: Tue, 26 Apr 2016 10:03:47 -0400 Subject: [PATCH] https://issues.apache.org/jira/browse/AMQ-6251 Make field volatile since it is written to outside of any locks and read both in and out of locking. --- .../src/main/java/org/apache/activemq/broker/region/Queue.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/activemq-broker/src/main/java/org/apache/activemq/broker/region/Queue.java b/activemq-broker/src/main/java/org/apache/activemq/broker/region/Queue.java index 097dfa5ff9..af37bdc438 100755 --- a/activemq-broker/src/main/java/org/apache/activemq/broker/region/Queue.java +++ b/activemq-broker/src/main/java/org/apache/activemq/broker/region/Queue.java @@ -132,7 +132,7 @@ public class Queue extends BaseDestination implements Task, UsageListener, Index private boolean allConsumersExclusiveByDefault = false; private final AtomicBoolean started = new AtomicBoolean(); - private boolean resetNeeded; + private volatile boolean resetNeeded; private final Runnable sendMessagesWaitingForSpaceTask = new Runnable() { @Override