Fix checkstyle problems not detected by the current version 21/58021/1
authorDavid Suarez <david.suarez.fuentes@ericsson.com>
Tue, 30 May 2017 22:40:36 +0000 (00:40 +0200)
committerDavid Suarez <david.suarez.fuentes@ericsson.com>
Tue, 30 May 2017 22:40:36 +0000 (00:40 +0200)
This change is required for overall move to new Checkstyle version, see
https://git.opendaylight.org/gerrit/#/q/topic:bumpCheckstyle

Change-Id: I9755c1964a7ffa4f6b7d188b5b746e2c9246ad45
Signed-off-by: David Suarez <david.suarez.fuentes@ericsson.com>
opendaylight/md-sal/mdsal-trace/dom-impl/src/main/java/org/opendaylight/controller/md/sal/trace/dom/impl/TracingReadWriteTransaction.java
opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/FrontendTransaction.java

index c906ef9..b770e5d 100644 (file)
@@ -7,18 +7,15 @@
  */
 package org.opendaylight.controller.md.sal.trace.dom.impl;
 
-
 import com.google.common.base.Optional;
 import com.google.common.util.concurrent.CheckedFuture;
 import java.util.Objects;
-
 import org.opendaylight.controller.md.sal.common.api.data.LogicalDatastoreType;
 import org.opendaylight.controller.md.sal.common.api.data.ReadFailedException;
 import org.opendaylight.controller.md.sal.dom.api.DOMDataReadWriteTransaction;
 import org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier;
 import org.opendaylight.yangtools.yang.data.api.schema.NormalizedNode;
 
-
 class TracingReadWriteTransaction extends TracingWriteTransaction implements DOMDataReadWriteTransaction {
 
     private final DOMDataReadWriteTransaction delegate;
index 6c7ae07..9409319 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2016 Cisco Systems, Inc. and others.  All rights reserved.
+ * Copyright (c) 2016, 2017 Cisco Systems, Inc. and others.  All rights reserved.
  *
  * This program and the accompanying materials are made available under the
  * terms of the Eclipse Public License v1.0 which accompanies this distribution,
@@ -122,14 +122,15 @@ abstract class FrontendTransaction implements Identifiable<TransactionIdentifier
 
     // Request order has already been checked by caller and replaySequence()
     @SuppressWarnings("checkstyle:IllegalCatch")
-    final @Nullable TransactionSuccess<?> handleRequest(final TransactionRequest<?> request,
-            final RequestEnvelope envelope, final long now) throws RequestException {
+    @Nullable
+    final TransactionSuccess<?> handleRequest(final TransactionRequest<?> request, final RequestEnvelope envelope,
+            final long now) throws RequestException {
         if (request instanceof IncrementTransactionSequenceRequest) {
             final IncrementTransactionSequenceRequest incr = (IncrementTransactionSequenceRequest) request;
             expectedSequence += incr.getIncrement();
 
-            return recordSuccess(incr.getSequence(), new IncrementTransactionSequenceSuccess(incr.getTarget(),
-                incr.getSequence()));
+            return recordSuccess(incr.getSequence(),
+                    new IncrementTransactionSequenceSuccess(incr.getTarget(), incr.getSequence()));
         }
 
         if (previousFailure != null) {
@@ -141,8 +142,10 @@ abstract class FrontendTransaction implements Identifiable<TransactionIdentifier
             return doHandleRequest(request, envelope, now);
         } catch (RuntimeException e) {
             /*
-             * The request failed to process, we should not attempt to ever apply it again. Furthermore we cannot
-             * accept any further requests from this connection, simply because the transaction state is undefined.
+             * The request failed to process, we should not attempt to ever
+             * apply it again. Furthermore we cannot accept any further requests
+             * from this connection, simply because the transaction state is
+             * undefined.
              */
             LOG.debug("{}: Request {} failed to process", persistenceId(), request, e);
             previousFailure = new RuntimeRequestException("Request " + request + " failed to process", e);
@@ -150,7 +153,8 @@ abstract class FrontendTransaction implements Identifiable<TransactionIdentifier
         }
     }
 
-    abstract @Nullable TransactionSuccess<?> doHandleRequest(TransactionRequest<?> request, RequestEnvelope envelope,
+    @Nullable
+    abstract TransactionSuccess<?> doHandleRequest(TransactionRequest<?> request, RequestEnvelope envelope,
             long now) throws RequestException;
 
     private void recordResponse(final long sequence, final Object response) {
@@ -189,5 +193,4 @@ abstract class FrontendTransaction implements Identifiable<TransactionIdentifier
                 .add("lastPurgedSequence", lastPurgedSequence)
                 .toString();
     }
-
 }

©2013 OpenDaylight, A Linux Foundation Collaborative Project. All Rights Reserved.
OpenDaylight is a registered trademark of The OpenDaylight Project, Inc.
Linux Foundation and OpenDaylight are registered trademarks of the Linux Foundation.
Linux is a registered trademark of Linus Torvalds.