diff --git a/artemis-core-client/src/main/java/org/apache/activemq/artemis/utils/OrderedExecutorFactory.java b/artemis-core-client/src/main/java/org/apache/activemq/artemis/utils/OrderedExecutorFactory.java index 18db9c7606..b1e9d886c7 100644 --- a/artemis-core-client/src/main/java/org/apache/activemq/artemis/utils/OrderedExecutorFactory.java +++ b/artemis-core-client/src/main/java/org/apache/activemq/artemis/utils/OrderedExecutorFactory.java @@ -62,6 +62,10 @@ public final class OrderedExecutorFactory implements ExecutorFactory { private final Executor delegate; private final ExecutorTask task = new ExecutorTask(); + // used by stateUpdater + @SuppressWarnings("unused") + private volatile int state = 0; + private static final AtomicIntegerFieldUpdater stateUpdater = AtomicIntegerFieldUpdater.newUpdater(OrderedExecutor.class, "state"); private static final int STATE_NOT_RUNNING = 0;