Mechanical code cleanup (sal-dom-spi) 73/46073/3
authorStephen Kitt <skitt@redhat.com>
Thu, 22 Sep 2016 15:35:14 +0000 (17:35 +0200)
committerTom Pantelis <tpanteli@brocade.com>
Fri, 23 Sep 2016 18:40:08 +0000 (18:40 +0000)
* Remove unnecessary type specifiers (use Java 7 <>)
* Remove unnecessary "extends Object" declarations
* Remove unnecessary semi-colons
* Merge identical catch blocks
* Remove redundant modifiers:
  - enum constructors are private by default
  - interface properties are public static final by default
  - interface methods are public abstract by default
  - interfaces are abstract by default
  - inner interfaces are static by default
  - inner classes in interfaces are public static by default

Change-Id: I68a6f9ee118c8ff47bc2511efa234b93b09de32a
Signed-off-by: Stephen Kitt <skitt@redhat.com>
opendaylight/md-sal/sal-dom-spi/src/main/java/org/opendaylight/controller/md/sal/dom/spi/ForwardingDOMNotificationPublishService.java
opendaylight/md-sal/sal-dom-spi/src/main/java/org/opendaylight/controller/md/sal/dom/spi/RegistrationTreeNode.java
opendaylight/md-sal/sal-dom-spi/src/main/java/org/opendaylight/controller/sal/core/spi/data/AbstractSnapshotBackedTransactionChain.java
opendaylight/md-sal/sal-dom-spi/src/main/java/org/opendaylight/controller/sal/core/spi/data/DOMStoreTransaction.java
opendaylight/md-sal/sal-dom-spi/src/main/java/org/opendaylight/controller/sal/core/spi/data/SnapshotBackedTransactions.java

index 6bc1107..c9e6bcc 100644 (file)
@@ -22,17 +22,17 @@ public abstract class ForwardingDOMNotificationPublishService extends Forwarding
     protected abstract DOMNotificationPublishService delegate();
 
     @Override
-    public ListenableFuture<? extends Object> putNotification(final DOMNotification notification) throws InterruptedException {
+    public ListenableFuture<?> putNotification(final DOMNotification notification) throws InterruptedException {
         return delegate().putNotification(notification);
     }
 
     @Override
-    public ListenableFuture<? extends Object> offerNotification(final DOMNotification notification) {
+    public ListenableFuture<?> offerNotification(final DOMNotification notification) {
         return delegate().offerNotification(notification);
     }
 
     @Override
-    public ListenableFuture<? extends Object> offerNotification(final DOMNotification notification, final long timeout,
+    public ListenableFuture<?> offerNotification(final DOMNotification notification, final long timeout,
             final TimeUnit unit) throws InterruptedException {
         return delegate().offerNotification(notification, timeout, unit);
     }
index 41e80ea..378e9ed 100644 (file)
@@ -97,7 +97,7 @@ public final class RegistrationTreeNode<T> implements Identifiable<PathArgument>
     RegistrationTreeNode<T> ensureChild(@Nonnull final PathArgument child) {
         RegistrationTreeNode<T> potential = children.get(Preconditions.checkNotNull(child));
         if (potential == null) {
-            potential = new RegistrationTreeNode<T>(this, child);
+            potential = new RegistrationTreeNode<>(this, child);
             children.put(child, potential);
         }
         return potential;
index 7b6e68d..9898ce9 100644 (file)
@@ -140,7 +140,8 @@ public abstract class AbstractSnapshotBackedTransactionChain<T> extends Transact
 
         do {
             entry = getSnapshot(transactionId);
-            ret = new SnapshotBackedReadWriteTransaction<T>(transactionId, getDebugTransactions(), entry.getValue(), this);
+            ret = new SnapshotBackedReadWriteTransaction<>(transactionId, getDebugTransactions(), entry.getValue(),
+                    this);
         } while (!recordTransaction(entry.getKey(), ret));
 
         return ret;
@@ -157,7 +158,7 @@ public abstract class AbstractSnapshotBackedTransactionChain<T> extends Transact
 
         do {
             entry = getSnapshot(transactionId);
-            ret = new SnapshotBackedWriteTransaction<T>(transactionId, getDebugTransactions(), entry.getValue(), this);
+            ret = new SnapshotBackedWriteTransaction<>(transactionId, getDebugTransactions(), entry.getValue(), this);
         } while (!recordTransaction(entry.getKey(), ret));
 
         return ret;
index 76ea78b..b225576 100644 (file)
@@ -21,7 +21,7 @@ public interface DOMStoreTransaction extends AutoCloseable, Identifiable<Object>
      * Unique identifier of the transaction
      */
     @Override
-    public Object getIdentifier();
+    Object getIdentifier();
 
     @Override
     void close();
index 3368c8a..927e224 100644 (file)
@@ -28,7 +28,7 @@ public final class SnapshotBackedTransactions {
      * @param snapshot Snapshot which will be modified.
      */
     public static <T> SnapshotBackedReadTransaction<T> newReadTransaction(final T identifier, final boolean debug, final DataTreeSnapshot snapshot) {
-        return new SnapshotBackedReadTransaction<T>(identifier, debug, snapshot);
+        return new SnapshotBackedReadTransaction<>(identifier, debug, snapshot);
     }
 
     /**
@@ -41,7 +41,7 @@ public final class SnapshotBackedTransactions {
      */
     public static <T> SnapshotBackedReadWriteTransaction<T> newReadWriteTransaction(final T identifier, final boolean debug,
             final DataTreeSnapshot snapshot, final TransactionReadyPrototype<T> readyImpl) {
-        return new SnapshotBackedReadWriteTransaction<T>(identifier, debug, snapshot, readyImpl);
+        return new SnapshotBackedReadWriteTransaction<>(identifier, debug, snapshot, readyImpl);
     }
 
     /**
@@ -54,6 +54,6 @@ public final class SnapshotBackedTransactions {
      */
     public static <T> SnapshotBackedWriteTransaction<T> newWriteTransaction(final T identifier, final boolean debug,
             final DataTreeSnapshot snapshot, final TransactionReadyPrototype<T> readyImpl) {
-        return new SnapshotBackedWriteTransaction<T>(identifier, debug, snapshot, readyImpl);
+        return new SnapshotBackedWriteTransaction<>(identifier, debug, snapshot, readyImpl);
     }
 }

©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.