Mechanical code cleanup (sal-binding-api) 83/46083/3
authorStephen Kitt <skitt@redhat.com>
Thu, 22 Sep 2016 16:20:18 +0000 (18:20 +0200)
committerTom Pantelis <tpanteli@brocade.com>
Fri, 23 Sep 2016 18:47:59 +0000 (18:47 +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: Ia2f892083eb30b898fbd544ec62620ee6976a553
Signed-off-by: Stephen Kitt <skitt@redhat.com>
opendaylight/md-sal/sal-binding-api/src/main/java/org/opendaylight/controller/md/sal/binding/api/MountPointService.java
opendaylight/md-sal/sal-binding-api/src/main/java/org/opendaylight/controller/md/sal/binding/api/NotificationPublishService.java
opendaylight/md-sal/sal-binding-api/src/main/java/org/opendaylight/controller/sal/binding/api/BindingAwareBroker.java
opendaylight/md-sal/sal-binding-api/src/main/java/org/opendaylight/controller/sal/binding/api/NotificationProviderService.java
opendaylight/md-sal/sal-binding-api/src/main/java/org/opendaylight/controller/sal/binding/api/data/DataBrokerService.java
opendaylight/md-sal/sal-binding-api/src/main/java/org/opendaylight/controller/sal/binding/api/data/DataChangeListener.java
opendaylight/md-sal/sal-binding-api/src/main/java/org/opendaylight/controller/sal/binding/api/data/DataModificationTransaction.java
opendaylight/md-sal/sal-binding-api/src/main/java/org/opendaylight/controller/sal/binding/api/mount/MountProviderService.java

index 05583271262a082c56566e2d3c2894d436be3fb4..43e2d85d4600db572888fd9a6f84bc80af5b1d33 100644 (file)
@@ -19,7 +19,7 @@ public interface MountPointService extends BindingService {
     <T extends MountPointListener> ListenerRegistration<T> registerListener(InstanceIdentifier<?> path, T listener);
 
 
-    public interface MountPointListener extends EventListener {
+    interface MountPointListener extends EventListener {
 
         void onMountPointCreated(InstanceIdentifier<?> path);
 
index 5ec51269b738df3e7625133773a2d72cf1af7705..7f8b734a7a9969d5d2975fa5e707144144ad8297 100644 (file)
@@ -65,7 +65,7 @@ public interface NotificationPublishService extends BindingService {
      * constraints prevent
      * @throws NullPointerException if the notification is null
      */
-    ListenableFuture<? extends Object> offerNotification(Notification notification);
+    ListenableFuture<?> offerNotification(Notification notification);
 
     /**
      * Publishes a notification to subscribed listeners. This initiates
@@ -86,7 +86,7 @@ public interface NotificationPublishService extends BindingService {
      * @throws NullPointerException if the notification or unit is null
      * @throws IllegalArgumentException if timeout is negative.
      */
-    ListenableFuture<? extends Object> offerNotification(Notification notification, int timeout, TimeUnit unit)
+    ListenableFuture<?> offerNotification(Notification notification, int timeout, TimeUnit unit)
             throws InterruptedException;
 
 }
index ab62c803e2d3e01badc4824bf548f27bd5e80226..8ede7476b61da6cd545d466a150e38c82be2f5e1 100644 (file)
@@ -129,7 +129,7 @@ public interface BindingAwareBroker {
      * infrastructure services and other functionality provided by
      * {@link Provider}s.
      */
-    public interface ConsumerContext extends RpcConsumerRegistry {
+    interface ConsumerContext extends RpcConsumerRegistry {
 
         /**
          * Returns a session specific instance (implementation) of requested
@@ -158,7 +158,7 @@ public interface BindingAwareBroker {
      * functionality provided by other {@link BindingAwareConsumer}s.
      *
      */
-    public interface ProviderContext extends ConsumerContext, RpcProviderRegistry {
+    interface ProviderContext extends ConsumerContext, RpcProviderRegistry {
 
     }
 
@@ -168,7 +168,7 @@ public interface BindingAwareBroker {
      *
      * @param <T> the implemented RPC service interface
      */
-    public interface RpcRegistration<T extends RpcService> extends ObjectRegistration<T> {
+    interface RpcRegistration<T extends RpcService> extends ObjectRegistration<T> {
 
         /**
          * Returns the implemented RPC service interface.
@@ -185,7 +185,7 @@ public interface BindingAwareBroker {
      *
      * @param <T> the implemented RPC service interface
      */
-    public interface RoutedRpcRegistration<T extends RpcService> extends RpcRegistration<T>,
+    interface RoutedRpcRegistration<T extends RpcService> extends RpcRegistration<T>,
             RoutedRegistration<Class<? extends BaseIdentity>, InstanceIdentifier<?>, T> {
 
         /**
index 4b06e77c44b7c7b3ff061623d4e16003f17fb8f2..073f98a91f1f74459a4c1cde93bacb04d21462c2 100644 (file)
@@ -27,7 +27,7 @@ public interface NotificationProviderService extends NotificationService, Notifi
      * {@inheritDoc}
      */
     @Override
-    public void publish(Notification notification);
+    void publish(Notification notification);
 
     /**
      * {@inheritDoc}
@@ -56,7 +56,7 @@ public interface NotificationProviderService extends NotificationService, Notifi
     /**
      * Interface for a listener interested in being notified about notification subscriptions.
      */
-    public interface NotificationInterestListener extends EventListener {
+    interface NotificationInterestListener extends EventListener {
 
         /**
          * Callback that is invoked when a notification listener subscribes for a
index b274a05af76f9eb9101619a613b8977d1cb6f727..d1f9d3eafefc3ea4991e2349054d2625ee487047 100644 (file)
@@ -48,7 +48,7 @@ public interface DataBrokerService extends BindingAwareService,
      */
     @Override
     @Deprecated
-    public DataObject readConfigurationData(InstanceIdentifier<? extends DataObject> path);
+    DataObject readConfigurationData(InstanceIdentifier<? extends DataObject> path);
 
     /**
      * Reads data subtree from operational store.
@@ -59,7 +59,7 @@ public interface DataBrokerService extends BindingAwareService,
      */
     @Override
     @Deprecated
-    public DataObject readOperationalData(InstanceIdentifier<? extends DataObject> path);
+    DataObject readOperationalData(InstanceIdentifier<? extends DataObject> path);
 
     /**
      * Register a data change listener for particular subtree.
@@ -70,6 +70,6 @@ public interface DataBrokerService extends BindingAwareService,
      * which provides more fine-grained registration options.
      */
     @Deprecated
-    public ListenerRegistration<DataChangeListener> registerDataChangeListener(
+    ListenerRegistration<DataChangeListener> registerDataChangeListener(
             InstanceIdentifier<? extends DataObject> path, DataChangeListener listener);
 }
index e26cbcef29b7e40a3757425216f0253d706fcda1..7df92bf62073d1f6fb1f5e183612317e0ae5bfc3 100644 (file)
@@ -21,5 +21,5 @@ public interface DataChangeListener extends
         org.opendaylight.controller.md.sal.common.api.data.DataChangeListener<InstanceIdentifier<? extends DataObject>, DataObject> {
 
     @Override
-    public void onDataChanged(DataChangeEvent<InstanceIdentifier<?>, DataObject> change);
+    void onDataChanged(DataChangeEvent<InstanceIdentifier<?>, DataObject> change);
 }
index e1055c09703a6b47a7b63f1e7f83806f5d8040f8..b769812f2b8609611838225d545940841adc266c 100644 (file)
@@ -75,7 +75,7 @@ public interface DataModificationTransaction extends
     /**
      * Listener for transaction state changes
      */
-    public interface DataTransactionListener extends EventListener {
+    interface DataTransactionListener extends EventListener {
         /**
          * Callback is invoked after each transaction status change.
          *
index 6af9093fdd4c79c101808e528c8546b26a8b3056..9eb704f19fbe806e01056f65f2605689f13a6e36 100644 (file)
@@ -23,7 +23,7 @@ import org.opendaylight.yangtools.yang.binding.InstanceIdentifier;
 public interface MountProviderService extends MountService {
 
     @Override
-    public MountProviderInstance getMountPoint(InstanceIdentifier<?> path);
+    MountProviderInstance getMountPoint(InstanceIdentifier<?> path);
 
     MountProviderInstance createMountPoint(InstanceIdentifier<?> path);
 
@@ -31,7 +31,7 @@ public interface MountProviderService extends MountService {
 
     ListenerRegistration<MountProvisionListener> registerProvisionListener(MountProvisionListener listener);
 
-    public interface MountProvisionListener extends EventListener {
+    interface MountProvisionListener extends EventListener {
 
         void onMountPointCreated(InstanceIdentifier<?> path);