Fix CS warnings in cds-access-client and enable enforcement 71/47471/3
authorTom Pantelis <tpanteli@brocade.com>
Tue, 25 Oct 2016 04:49:04 +0000 (00:49 -0400)
committerTom Pantelis <tpanteli@brocade.com>
Tue, 25 Oct 2016 18:03:05 +0000 (18:03 +0000)
Fixed checkstyle warnings and enabled enforcement. Most of the
warnings/changes were for:
 - variable name too short
 - correct ordering of @Nonnull annotations
 - line too long
 - javadocs

Change-Id: Ib888dbf909282079bff6320ce718d5a4da3ed31a
Signed-off-by: Tom Pantelis <tpanteli@brocade.com>
16 files changed:
opendaylight/md-sal/cds-access-client/pom.xml
opendaylight/md-sal/cds-access-client/src/main/java/org/opendaylight/controller/cluster/access/client/AbstractClientActorBehavior.java
opendaylight/md-sal/cds-access-client/src/main/java/org/opendaylight/controller/cluster/access/client/AbstractClientActorContext.java
opendaylight/md-sal/cds-access-client/src/main/java/org/opendaylight/controller/cluster/access/client/BackendInfo.java
opendaylight/md-sal/cds-access-client/src/main/java/org/opendaylight/controller/cluster/access/client/BackendInfoResolver.java
opendaylight/md-sal/cds-access-client/src/main/java/org/opendaylight/controller/cluster/access/client/ClientActorBehavior.java
opendaylight/md-sal/cds-access-client/src/main/java/org/opendaylight/controller/cluster/access/client/ClientActorContext.java
opendaylight/md-sal/cds-access-client/src/main/java/org/opendaylight/controller/cluster/access/client/EmptyQueue.java
opendaylight/md-sal/cds-access-client/src/main/java/org/opendaylight/controller/cluster/access/client/InitialClientActorContext.java
opendaylight/md-sal/cds-access-client/src/main/java/org/opendaylight/controller/cluster/access/client/RecoveredClientActorBehavior.java
opendaylight/md-sal/cds-access-client/src/main/java/org/opendaylight/controller/cluster/access/client/SavingClientActorBehavior.java
opendaylight/md-sal/cds-access-client/src/main/java/org/opendaylight/controller/cluster/access/client/SequencedQueue.java
opendaylight/md-sal/cds-access-client/src/test/java/org/opendaylight/controller/cluster/access/client/AbstractClientActorTest.java
opendaylight/md-sal/cds-access-client/src/test/java/org/opendaylight/controller/cluster/access/client/ClientActorContextTest.java
opendaylight/md-sal/cds-access-client/src/test/java/org/opendaylight/controller/cluster/access/client/SequencedQueueEntryTest.java
opendaylight/md-sal/cds-access-client/src/test/java/org/opendaylight/controller/cluster/access/client/SequencedQueueTest.java

index 1ed37ff04af7d69918ccf5116936cf41e1dccf96..376be8c107a612f3f9b19a5de5d2e8707e7f38a1 100644 (file)
         </dependency>
     </dependencies>
 
+    <build>
+      <plugins>
+        <plugin>
+          <groupId>org.apache.maven.plugins</groupId>
+          <artifactId>maven-checkstyle-plugin</artifactId>
+          <configuration>
+            <propertyExpansion>checkstyle.violationSeverity=error</propertyExpansion>
+          </configuration>
+        </plugin>
+      </plugins>
+    </build>
+
     <scm>
         <connection>scm:git:http://git.opendaylight.org/gerrit/controller.git</connection>
         <developerConnection>scm:git:ssh://git.opendaylight.org:29418/controller.git</developerConnection>
index e564359fccb1d4e106318727aed970efa0804411..0a49fc03a146a84cad0d6befb4ccb2b786720924 100644 (file)
@@ -14,8 +14,7 @@ import javax.annotation.Nonnull;
 import javax.annotation.Nullable;
 
 /**
- * Base behavior attached to {@link AbstractClientActor}. Exposes
- * @author user
+ * Base behavior attached to {@link AbstractClientActor}.
  *
  * @param <C> Type of associated context
  *
@@ -25,7 +24,7 @@ import javax.annotation.Nullable;
 public abstract class AbstractClientActorBehavior<C extends AbstractClientActorContext> {
     private final C context;
 
-    AbstractClientActorBehavior(final @Nonnull C context) {
+    AbstractClientActorBehavior(@Nonnull final C context) {
         // Hidden to prevent outside subclasses. Users instantiated this via ClientActorBehavior
         this.context = Preconditions.checkNotNull(context);
     }
@@ -35,7 +34,8 @@ public abstract class AbstractClientActorBehavior<C extends AbstractClientActorC
      *
      * @return A client actor context instance.
      */
-    protected final @Nonnull C context() {
+    @Nonnull
+    protected final C context() {
         return context;
     }
 
@@ -45,7 +45,8 @@ public abstract class AbstractClientActorBehavior<C extends AbstractClientActorC
      *
      * @return Persistence identifier
      */
-    protected final @Nonnull String persistenceId() {
+    @Nonnull
+    protected final String persistenceId() {
         return context.persistenceId();
     }
 
@@ -54,7 +55,8 @@ public abstract class AbstractClientActorBehavior<C extends AbstractClientActorC
      *
      * @return Actor associated with this behavior
      */
-    public final @Nonnull ActorRef self() {
+    @Nonnull
+    public final ActorRef self() {
         return context.self();
     }
 
@@ -64,7 +66,8 @@ public abstract class AbstractClientActorBehavior<C extends AbstractClientActorC
      * @param command Command message
      * @return Behavior which should be used with the next message. Return null if this actor should shut down.
      */
-    abstract @Nullable AbstractClientActorBehavior<?> onReceiveCommand(@Nonnull Object command);
+    @Nullable
+    abstract AbstractClientActorBehavior<?> onReceiveCommand(@Nonnull Object command);
 
     /**
      * Implementation-internal method for handling an incoming recovery message coming from persistence.
@@ -72,5 +75,6 @@ public abstract class AbstractClientActorBehavior<C extends AbstractClientActorC
      * @param recover Recover message
      * @return Behavior which should be used with the next message. Return null if this actor should shut down.
      */
-    abstract @Nullable AbstractClientActorBehavior<?> onReceiveRecover(@Nonnull Object recover);
+    @Nullable
+    abstract AbstractClientActorBehavior<?> onReceiveRecover(@Nonnull Object recover);
 }
index 0ca3545cf33eba797b6b278a5da675d75e4d442e..7899358a17f86e07b18588fd5f6caca98e1e007d 100644 (file)
@@ -13,8 +13,8 @@ import javax.annotation.Nonnull;
 import org.opendaylight.yangtools.concepts.Mutable;
 
 /**
- * Common, externally-invisible superclass of contexts associated with a {@link AbstractClientActor}. End users pass this
- * object via opaque {@link ClientActorContext}.
+ * Common, externally-invisible superclass of contexts associated with a {@link AbstractClientActor}. End users pass
+ * this object via opaque {@link ClientActorContext}.
  *
  * @author Robert Varga
  */
@@ -22,16 +22,18 @@ abstract class AbstractClientActorContext implements Mutable {
     private final String persistenceId;
     private final ActorRef self;
 
-    AbstractClientActorContext(final @Nonnull ActorRef self, final @Nonnull String persistenceId) {
+    AbstractClientActorContext(@Nonnull final ActorRef self, @Nonnull final String persistenceId) {
         this.persistenceId = Preconditions.checkNotNull(persistenceId);
         this.self = Preconditions.checkNotNull(self);
     }
 
-    final @Nonnull String persistenceId() {
+    @Nonnull
+    final String persistenceId() {
         return persistenceId;
     }
 
-    public final @Nonnull ActorRef self() {
+    @Nonnull
+    public final ActorRef self() {
         return self;
     }
 }
index bdffb08c3eb81bf576d3420520db7ef814942013..a5a579dc031bbbbfff450ebc39d28aadcfaeab7e 100644 (file)
@@ -17,6 +17,7 @@ import org.opendaylight.controller.cluster.access.ABIVersion;
  * Basic information about how to talk to the backend. ClientActorBehavior uses this information to dispatch requests
  * to the backend.
  *
+ * <p>
  * This class is not final so concrete actor behavior implementations may subclass it and track more information about
  * the backend. The {@link #hashCode()} and {@link #equals(Object)} methods are made final to ensure subclasses compare
  * on identity.
index cb648091203ba170014e084c30f01f93bf3f2b56..71805735f0587e7663ab9dbdbca5226e4a1089ce 100644 (file)
@@ -61,7 +61,7 @@ public abstract class BackendInfoResolver<T extends BackendInfo> {
      * @param cookie Backend cookie
      * @param info Previous information to be invalidated
      */
-    public final void invalidateBackend(final long cookie, final @Nonnull CompletionStage<? extends BackendInfo> info) {
+    public final void invalidateBackend(final long cookie, @Nonnull final CompletionStage<? extends BackendInfo> info) {
         if (backends.remove(cookie, Preconditions.checkNotNull(info))) {
             LOG.trace("Invalidated cache %s -> %s", Long.toUnsignedString(cookie), info);
             invalidateBackendInfo(info);
@@ -75,7 +75,8 @@ public abstract class BackendInfoResolver<T extends BackendInfo> {
      * @param cookie Backend cookie
      * @return A {@link CompletableFuture} resulting in information about the backend
      */
-    protected abstract @Nonnull CompletableFuture<T> resolveBackendInfo(final @Nonnull Long cookie);
+    @Nonnull
+    protected abstract CompletableFuture<T> resolveBackendInfo(@Nonnull final Long cookie);
 
     /**
      * Invalidate previously-resolved shard information. This method is invoked when a timeout is detected
index 8939ec977e16dabcc6f9507950aa07a3d95c3d4c..43b621c05c15105939bec26fc921274114e87108 100644 (file)
@@ -34,12 +34,13 @@ public abstract class ClientActorBehavior extends RecoveredClientActorBehavior<C
         implements Identifiable<ClientIdentifier> {
     private static final Logger LOG = LoggerFactory.getLogger(ClientActorBehavior.class);
 
-    protected ClientActorBehavior(final @Nonnull ClientActorContext context) {
+    protected ClientActorBehavior(@Nonnull final ClientActorContext context) {
         super(context);
     }
 
     @Override
-    public final @Nonnull ClientIdentifier getIdentifier() {
+    @Nonnull
+    public final ClientIdentifier getIdentifier() {
         return context().getIdentifier();
     }
 
@@ -145,6 +146,7 @@ public abstract class ClientActorBehavior extends RecoveredClientActorBehavior<C
             needBackend = queue.runTimeout();
         } catch (NoProgressException e) {
             // Uh-oh, no progress. The queue has already killed itself, now we need to remove it
+            LOG.debug("{}: No progress made - removing queue", persistenceId(), e);
             context().removeQueue(queue);
             return this;
         }
@@ -157,10 +159,9 @@ public abstract class ClientActorBehavior extends RecoveredClientActorBehavior<C
     }
 
     /**
-     * Halt And Catch Fire.
-     *
-     * Halt processing on this client. Implementations need to ensure they initiate state flush procedures. No attempt
-     * to use this instance should be made after this method returns. Any such use may result in undefined behavior.
+     * Halt And Catch Fire. Halt processing on this client. Implementations need to ensure they initiate state flush
+     * procedures. No attempt to use this instance should be made after this method returns. Any such use may result
+     * in undefined behavior.
      *
      * @param cause Failure cause
      */
@@ -169,17 +170,19 @@ public abstract class ClientActorBehavior extends RecoveredClientActorBehavior<C
     /**
      * Override this method to handle any command which is not handled by the base behavior.
      *
-     * @param command
+     * @param command the command to process
      * @return Next behavior to use, null if this actor should shut down.
      */
-    protected abstract @Nullable ClientActorBehavior onCommand(@Nonnull Object command);
+    @Nullable
+    protected abstract ClientActorBehavior onCommand(@Nonnull Object command);
 
     /**
      * Override this method to provide a backend resolver instance.
      *
-     * @return
+     * @return a backend resolver instance
      */
-    protected abstract @Nonnull BackendInfoResolver<?> resolver();
+    @Nonnull
+    protected abstract BackendInfoResolver<?> resolver();
 
     /**
      * Send a request to the backend and invoke a specified callback when it finishes. This method is safe to invoke
index e8993c0ee70d0b6fa51459b65ec6b7dc650c225e..26e68356d3f4404e7050bcbcc905542dc6eccb18 100644 (file)
@@ -31,6 +31,7 @@ import scala.concurrent.duration.FiniteDuration;
 /**
  * An actor context associated with this {@link AbstractClientActor}.
  *
+ * <p>
  * Time-keeping in a client actor is based on monotonic time. The precision of this time can be expected to be the
  * same as {@link System#nanoTime()}, but it is not tied to that particular clock. Actor clock is exposed as
  * a {@link Ticker}, which can be obtained via {@link #ticker()}.
@@ -57,7 +58,8 @@ public class ClientActorContext extends AbstractClientActorContext implements Id
     }
 
     @Override
-    public @Nonnull ClientIdentifier getIdentifier() {
+    @Nonnull
+    public ClientIdentifier getIdentifier() {
         return identifier;
     }
 
@@ -68,7 +70,8 @@ public class ClientActorContext extends AbstractClientActorContext implements Id
      *
      * @return Client actor time source
      */
-    public @Nonnull Ticker ticker() {
+    @Nonnull
+    public Ticker ticker() {
         return Ticker.systemTicker();
     }
 
@@ -77,11 +80,11 @@ public class ClientActorContext extends AbstractClientActorContext implements Id
      *
      * @param command Block of code which needs to be execute
      */
-    public void executeInActor(final @Nonnull InternalCommand command) {
+    public void executeInActor(@Nonnull final InternalCommand command) {
         self().tell(Preconditions.checkNotNull(command), ActorRef.noSender());
     }
 
-    public Cancellable executeInActor(final @Nonnull InternalCommand command, final FiniteDuration delay) {
+    public Cancellable executeInActor(@Nonnull final InternalCommand command, final FiniteDuration delay) {
         return scheduler.scheduleOnce(Preconditions.checkNotNull(delay), self(), Preconditions.checkNotNull(command),
             executionContext, ActorRef.noSender());
     }
index 1513ebaad6c1dd1c924cfaf800aeb522ef6be585..c4a09e736c8279df4029e53c94d31832b5a5cd41 100644 (file)
@@ -36,7 +36,7 @@ public final class EmptyQueue<E> extends AbstractQueue<E> {
     }
 
     @Override
-    public boolean offer(final E e) {
+    public boolean offer(final E entry) {
         return false;
     }
 
index 5a10036373de463a6a3425a1a666ef3df9be9cea..50183c18b7b079facb456e7bf4dd86e5d75bff43 100644 (file)
@@ -13,6 +13,7 @@ import com.google.common.base.Preconditions;
 import org.opendaylight.controller.cluster.access.concepts.ClientIdentifier;
 
 /**
+ * The initial context for an actor.
  *
  * @author Robert Varga
  */
index 6ec8ec8389b8ae821558485de9a916a0d7c51616..3199db35fbd38ca251c05b4254a056fc4c8c1974 100644 (file)
@@ -8,11 +8,14 @@
 package org.opendaylight.controller.cluster.access.client;
 
 /**
+ * Abstract base class class for a behavior whose actor has recovered from persistence.
+ *
  * @param <C> Concrete context type
  *
  * @author Robert Varga
  */
-abstract class RecoveredClientActorBehavior<C extends AbstractClientActorContext> extends AbstractClientActorBehavior<C> {
+abstract class RecoveredClientActorBehavior<C extends AbstractClientActorContext>
+        extends AbstractClientActorBehavior<C> {
 
     RecoveredClientActorBehavior(final C context) {
         super(context);
index 5fc3ef38841d51c811ea792d55677a145590b1b0..8f6e991519d045234bcc6a7a3ba7784a5b5bb1fc 100644 (file)
@@ -46,7 +46,8 @@ final class SavingClientActorBehavior extends RecoveredClientActorBehavior<Initi
             LOG.debug("{}: got command: {}", persistenceId(), command);
         } else if (command instanceof DeleteSnapshotsFailure) {
             // Not treating this as a fatal error.
-            LOG.warn("{}: failed to delete prior snapshots", persistenceId(), ((DeleteSnapshotsFailure) command).cause());
+            LOG.warn("{}: failed to delete prior snapshots", persistenceId(),
+                    ((DeleteSnapshotsFailure) command).cause());
         } else {
             LOG.debug("{}: stashing command {}", persistenceId(), command);
             context().stash();
@@ -56,4 +57,4 @@ final class SavingClientActorBehavior extends RecoveredClientActorBehavior<Initi
         context().unstash();
         return context().createBehavior(myId);
     }
-}
\ No newline at end of file
+}
index 5cf7873a4b95efadc64ba335dc3004aea9333bb4..0e8d1b9d56b8c5674268ca1ec21b9fb24b43ad3f 100644 (file)
@@ -28,6 +28,8 @@ import org.slf4j.LoggerFactory;
 import scala.concurrent.duration.FiniteDuration;
 
 /*
+ * A queue that processes entries in sequence.
+ *
  * TODO: make this class and its users thread-safe. This will require some atomic state-keeping so that timeouts,
  *       retries and enqueues work as expected.
  */
@@ -118,7 +120,7 @@ final class SequencedQueue {
      * 2) The request has been enqueued and transmitted, but the caller needs to schedule a new timer
      * 3) The request has been enqueued, but the caller needs to request resolution of backend information and that
      *    process needs to complete before transmission occurs
-     *
+     * <p/>
      * These options are covered via returning an {@link Optional}. The caller needs to examine it and decode
      * the scenarios above according to the following rules:
      * - if is null, the first case applies
@@ -271,7 +273,8 @@ final class SequencedQueue {
         transmitEntries(pending, toSend);
     }
 
-    Optional<FiniteDuration> setBackendInfo(final CompletionStage<? extends BackendInfo> proof, final BackendInfo backend) {
+    Optional<FiniteDuration> setBackendInfo(final CompletionStage<? extends BackendInfo> proof,
+            final BackendInfo backend) {
         Preconditions.checkNotNull(backend);
         if (!proof.equals(backendProof)) {
             LOG.debug("Ignoring resolution {} while waiting for {}", proof, this.backendProof);
index 34abbe5477f42090b6c24fb3602872c4ecbcda65..b4e64c8ab5985d566ed7b5edddee6ff8fcfb36f7 100644 (file)
@@ -8,6 +8,7 @@
 package org.opendaylight.controller.cluster.access.client;
 
 import static org.junit.Assert.assertSame;
+
 import akka.actor.ActorRef;
 import akka.actor.Scheduler;
 import akka.dispatch.Dispatcher;
@@ -23,7 +24,8 @@ import org.opendaylight.controller.cluster.access.concepts.MemberName;
 
 public class ClientActorContextTest {
     private static final MemberName MEMBER_NAME = MemberName.forName("member-1");
-    private static final FrontendType FRONTEND_TYPE = FrontendType.forName(ClientActorContextTest.class.getSimpleName());
+    private static final FrontendType FRONTEND_TYPE =
+            FrontendType.forName(ClientActorContextTest.class.getSimpleName());
     private static final FrontendIdentifier FRONTEND_ID = FrontendIdentifier.create(MEMBER_NAME, FRONTEND_TYPE);
     private static final ClientIdentifier CLIENT_ID = ClientIdentifier.create(FRONTEND_ID, 0);
     private static final String PERSISTENCE_ID = ClientActorContextTest.class.getSimpleName();
@@ -44,7 +46,8 @@ public class ClientActorContextTest {
 
     @Test
     public void testMockingControl() {
-        ClientActorContext ctx = new ClientActorContext(mockSelf, mockScheduler, mockDispatcher, PERSISTENCE_ID, CLIENT_ID);
+        ClientActorContext ctx = new ClientActorContext(mockSelf, mockScheduler, mockDispatcher,
+                PERSISTENCE_ID, CLIENT_ID);
         assertSame(CLIENT_ID, ctx.getIdentifier());
         assertSame(PERSISTENCE_ID, ctx.persistenceId());
         assertSame(mockSelf, ctx.self());
@@ -52,7 +55,8 @@ public class ClientActorContextTest {
 
     @Test
     public void testTicker() {
-        ClientActorContext ctx = new ClientActorContext(mockSelf, mockScheduler, mockDispatcher, PERSISTENCE_ID, CLIENT_ID);
+        ClientActorContext ctx = new ClientActorContext(mockSelf, mockScheduler, mockDispatcher,
+                PERSISTENCE_ID, CLIENT_ID);
         assertSame(Ticker.systemTicker(), ctx.ticker());
     }
 }
index 1b56e5389c82c9d7a99e4e303667d7cf4623a5ce..8cc990ce7c98168261779a9fc803ec3d890f0555 100644 (file)
@@ -15,6 +15,7 @@ import static org.junit.Assert.assertTrue;
 import static org.mockito.Matchers.any;
 import static org.mockito.Mockito.doReturn;
 import static org.mockito.Mockito.verify;
+
 import akka.actor.ActorRef;
 import akka.actor.ActorSystem;
 import akka.testkit.TestProbe;
@@ -54,7 +55,8 @@ public class SequencedQueueEntryTest {
         }
 
         @Override
-        protected AbstractRequestFailureProxy<WritableIdentifier, MockFailure> externalizableProxy(final ABIVersion version) {
+        protected AbstractRequestFailureProxy<WritableIdentifier, MockFailure> externalizableProxy(
+                final ABIVersion version) {
             return null;
         }
 
@@ -193,12 +195,12 @@ public class SequencedQueueEntryTest {
         assertRequestEquals(mockRequest, mockActor.receiveOne(Duration.apply(5, TimeUnit.SECONDS)));
     }
 
-     private static void assertRequestEquals(final Request<?, ?> expected, final Object o) {
-         assertTrue(o instanceof RequestEnvelope);
+    private static void assertRequestEquals(final Request<?, ?> expected, final Object obj) {
+        assertTrue(obj instanceof RequestEnvelope);
 
-         final RequestEnvelope actual = (RequestEnvelope) o;
-         assertEquals(0, actual.getSessionId());
-         assertEquals(0, actual.getTxSequence());
-         assertEquals(expected.getTarget(), actual.getMessage().getTarget());
+        final RequestEnvelope actual = (RequestEnvelope) obj;
+        assertEquals(0, actual.getSessionId());
+        assertEquals(0, actual.getTxSequence());
+        assertEquals(expected.getTarget(), actual.getMessage().getTarget());
     }
 }
index 305ec316611b8f61364bea8053da910429fb45d0..72be005664960c3faa9a4fd3ce808cac68ac9028 100644 (file)
@@ -17,6 +17,7 @@ import static org.mockito.Matchers.any;
 import static org.mockito.Mockito.doReturn;
 import static org.mockito.Mockito.verify;
 import static org.mockito.Mockito.verifyNoMoreInteractions;
+
 import akka.actor.ActorRef;
 import akka.actor.ActorSystem;
 import akka.testkit.TestProbe;
@@ -58,7 +59,8 @@ public class SequencedQueueTest {
         }
 
         @Override
-        protected AbstractRequestFailureProxy<WritableIdentifier, MockFailure> externalizableProxy(final ABIVersion version) {
+        protected AbstractRequestFailureProxy<WritableIdentifier, MockFailure> externalizableProxy(
+                final ABIVersion version) {
             return null;
         }
 
@@ -162,7 +164,7 @@ public class SequencedQueueTest {
         assertTrue(queue.hasCompleted());
     }
 
-    @Test(expected=IllegalStateException.class)
+    @Test(expected = IllegalStateException.class)
     public void testClosedEnqueueRequest() {
         queue.close();
 
@@ -186,7 +188,7 @@ public class SequencedQueueTest {
         assertSame(mockCause, captor.getValue().getCause());
     }
 
-    @Test(expected=IllegalStateException.class)
+    @Test(expected = IllegalStateException.class)
     public void testPoisonPerformsClose() {
         // Implies close()
         queue.poison(mockCause);
@@ -216,7 +218,7 @@ public class SequencedQueueTest {
         assertFalse(queue.expectProof(proof));
     }
 
-    @Test(expected=NullPointerException.class)
+    @Test(expected = NullPointerException.class)
     public void testSetBackendNull() {
         final CompletableFuture<BackendInfo> proof = new CompletableFuture<>();
         assertTrue(queue.expectProof(proof));
@@ -339,7 +341,7 @@ public class SequencedQueueTest {
         assertTrue(ret);
     }
 
-    @Test(expected=NoProgressException.class)
+    @Test(expected = NoProgressException.class)
     public void testRunTimeoutWithoutProgressExact() throws NoProgressException {
         queue.enqueueRequest(mockRequest, mockCallback);
 
@@ -349,7 +351,7 @@ public class SequencedQueueTest {
         queue.runTimeout();
     }
 
-    @Test(expected=NoProgressException.class)
+    @Test(expected = NoProgressException.class)
     public void testRunTimeoutWithoutProgressMore() throws NoProgressException {
         queue.enqueueRequest(mockRequest, mockCallback);
 
@@ -440,10 +442,10 @@ public class SequencedQueueTest {
         assertRequestEquals(expected, sequence, mockActor.receiveOne(FiniteDuration.apply(5, TimeUnit.SECONDS)));
     }
 
-    private static void assertRequestEquals(final Request<?, ?> expected, final long sequence, final Object o) {
-        assertTrue(o instanceof RequestEnvelope);
+    private static void assertRequestEquals(final Request<?, ?> expected, final long sequence, final Object obj) {
+        assertTrue(obj instanceof RequestEnvelope);
 
-        final RequestEnvelope actual = (RequestEnvelope) o;
+        final RequestEnvelope actual = (RequestEnvelope) obj;
         assertEquals(0, actual.getSessionId());
         assertEquals(sequence, actual.getTxSequence());
         assertSame(expected, actual.getMessage());