diff --git a/src/main/java/org/apache/commons/lang3/concurrent/BackgroundInitializer.java b/src/main/java/org/apache/commons/lang3/concurrent/BackgroundInitializer.java index 57fac11a8..a47b35382 100644 --- a/src/main/java/org/apache/commons/lang3/concurrent/BackgroundInitializer.java +++ b/src/main/java/org/apache/commons/lang3/concurrent/BackgroundInitializer.java @@ -86,13 +86,13 @@ import java.util.concurrent.Future; public abstract class BackgroundInitializer implements ConcurrentInitializer { /** The external executor service for executing tasks. */ - private ExecutorService externalExecutor; + private ExecutorService externalExecutor; // @GuardedBy("this") /** A reference to the executor service that is actually used. */ - private ExecutorService executor; + private ExecutorService executor; // @GuardedBy("this") /** Stores the handle to the background task. */ - private Future future; + private Future future; // @GuardedBy("this") /** * Creates a new instance of {@code BackgroundInitializer}. No external diff --git a/src/main/java/org/apache/commons/lang3/concurrent/TimedSemaphore.java b/src/main/java/org/apache/commons/lang3/concurrent/TimedSemaphore.java index 1f27ae2bd..30043d6b8 100644 --- a/src/main/java/org/apache/commons/lang3/concurrent/TimedSemaphore.java +++ b/src/main/java/org/apache/commons/lang3/concurrent/TimedSemaphore.java @@ -149,28 +149,28 @@ public class TimedSemaphore { private final boolean ownExecutor; /** A future object representing the timer task. */ - private ScheduledFuture task; + private ScheduledFuture task; // @GuardedBy("this") /** Stores the total number of invocations of the acquire() method. */ - private long totalAcquireCount; + private long totalAcquireCount; // @GuardedBy("this") /** * The counter for the periods. This counter is increased every time a * period ends. */ - private long periodCount; + private long periodCount; // @GuardedBy("this") /** The limit. */ - private int limit; + private int limit; // @GuardedBy("this") /** The current counter. */ - private int acquireCount; + private int acquireCount; // @GuardedBy("this") /** The number of invocations of acquire() in the last period. */ - private int lastCallsPerPeriod; + private int lastCallsPerPeriod; // @GuardedBy("this") /** A flag whether shutdown() was called. */ - private boolean shutdown; + private boolean shutdown; // @GuardedBy("this") /** * Creates a new instance of {@link TimedSemaphore} and initializes it with