From: Stephen Kitt Date: Thu, 22 Sep 2016 16:20:18 +0000 (+0200) Subject: Mechanical code cleanup (sal-binding-api) X-Git-Tag: release/carbon~466 X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?p=controller.git;a=commitdiff_plain;h=8c2337ab6d9f45c85008d9384efe1d124d0737a6 Mechanical code cleanup (sal-binding-api) * 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 --- diff --git a/opendaylight/md-sal/sal-binding-api/src/main/java/org/opendaylight/controller/md/sal/binding/api/MountPointService.java b/opendaylight/md-sal/sal-binding-api/src/main/java/org/opendaylight/controller/md/sal/binding/api/MountPointService.java index 0558327126..43e2d85d46 100644 --- a/opendaylight/md-sal/sal-binding-api/src/main/java/org/opendaylight/controller/md/sal/binding/api/MountPointService.java +++ b/opendaylight/md-sal/sal-binding-api/src/main/java/org/opendaylight/controller/md/sal/binding/api/MountPointService.java @@ -19,7 +19,7 @@ public interface MountPointService extends BindingService { ListenerRegistration registerListener(InstanceIdentifier path, T listener); - public interface MountPointListener extends EventListener { + interface MountPointListener extends EventListener { void onMountPointCreated(InstanceIdentifier path); diff --git a/opendaylight/md-sal/sal-binding-api/src/main/java/org/opendaylight/controller/md/sal/binding/api/NotificationPublishService.java b/opendaylight/md-sal/sal-binding-api/src/main/java/org/opendaylight/controller/md/sal/binding/api/NotificationPublishService.java index 5ec51269b7..7f8b734a7a 100644 --- a/opendaylight/md-sal/sal-binding-api/src/main/java/org/opendaylight/controller/md/sal/binding/api/NotificationPublishService.java +++ b/opendaylight/md-sal/sal-binding-api/src/main/java/org/opendaylight/controller/md/sal/binding/api/NotificationPublishService.java @@ -65,7 +65,7 @@ public interface NotificationPublishService extends BindingService { * constraints prevent * @throws NullPointerException if the notification is null */ - ListenableFuture 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 offerNotification(Notification notification, int timeout, TimeUnit unit) + ListenableFuture offerNotification(Notification notification, int timeout, TimeUnit unit) throws InterruptedException; } diff --git a/opendaylight/md-sal/sal-binding-api/src/main/java/org/opendaylight/controller/sal/binding/api/BindingAwareBroker.java b/opendaylight/md-sal/sal-binding-api/src/main/java/org/opendaylight/controller/sal/binding/api/BindingAwareBroker.java index ab62c803e2..8ede7476b6 100644 --- a/opendaylight/md-sal/sal-binding-api/src/main/java/org/opendaylight/controller/sal/binding/api/BindingAwareBroker.java +++ b/opendaylight/md-sal/sal-binding-api/src/main/java/org/opendaylight/controller/sal/binding/api/BindingAwareBroker.java @@ -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 the implemented RPC service interface */ - public interface RpcRegistration extends ObjectRegistration { + interface RpcRegistration extends ObjectRegistration { /** * Returns the implemented RPC service interface. @@ -185,7 +185,7 @@ public interface BindingAwareBroker { * * @param the implemented RPC service interface */ - public interface RoutedRpcRegistration extends RpcRegistration, + interface RoutedRpcRegistration extends RpcRegistration, RoutedRegistration, InstanceIdentifier, T> { /** diff --git a/opendaylight/md-sal/sal-binding-api/src/main/java/org/opendaylight/controller/sal/binding/api/NotificationProviderService.java b/opendaylight/md-sal/sal-binding-api/src/main/java/org/opendaylight/controller/sal/binding/api/NotificationProviderService.java index 4b06e77c44..073f98a91f 100644 --- a/opendaylight/md-sal/sal-binding-api/src/main/java/org/opendaylight/controller/sal/binding/api/NotificationProviderService.java +++ b/opendaylight/md-sal/sal-binding-api/src/main/java/org/opendaylight/controller/sal/binding/api/NotificationProviderService.java @@ -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 diff --git a/opendaylight/md-sal/sal-binding-api/src/main/java/org/opendaylight/controller/sal/binding/api/data/DataBrokerService.java b/opendaylight/md-sal/sal-binding-api/src/main/java/org/opendaylight/controller/sal/binding/api/data/DataBrokerService.java index b274a05af7..d1f9d3eafe 100644 --- a/opendaylight/md-sal/sal-binding-api/src/main/java/org/opendaylight/controller/sal/binding/api/data/DataBrokerService.java +++ b/opendaylight/md-sal/sal-binding-api/src/main/java/org/opendaylight/controller/sal/binding/api/data/DataBrokerService.java @@ -48,7 +48,7 @@ public interface DataBrokerService extends BindingAwareService, */ @Override @Deprecated - public DataObject readConfigurationData(InstanceIdentifier path); + DataObject readConfigurationData(InstanceIdentifier path); /** * Reads data subtree from operational store. @@ -59,7 +59,7 @@ public interface DataBrokerService extends BindingAwareService, */ @Override @Deprecated - public DataObject readOperationalData(InstanceIdentifier path); + DataObject readOperationalData(InstanceIdentifier 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 registerDataChangeListener( + ListenerRegistration registerDataChangeListener( InstanceIdentifier path, DataChangeListener listener); } diff --git a/opendaylight/md-sal/sal-binding-api/src/main/java/org/opendaylight/controller/sal/binding/api/data/DataChangeListener.java b/opendaylight/md-sal/sal-binding-api/src/main/java/org/opendaylight/controller/sal/binding/api/data/DataChangeListener.java index e26cbcef29..7df92bf620 100644 --- a/opendaylight/md-sal/sal-binding-api/src/main/java/org/opendaylight/controller/sal/binding/api/data/DataChangeListener.java +++ b/opendaylight/md-sal/sal-binding-api/src/main/java/org/opendaylight/controller/sal/binding/api/data/DataChangeListener.java @@ -21,5 +21,5 @@ public interface DataChangeListener extends org.opendaylight.controller.md.sal.common.api.data.DataChangeListener, DataObject> { @Override - public void onDataChanged(DataChangeEvent, DataObject> change); + void onDataChanged(DataChangeEvent, DataObject> change); } diff --git a/opendaylight/md-sal/sal-binding-api/src/main/java/org/opendaylight/controller/sal/binding/api/data/DataModificationTransaction.java b/opendaylight/md-sal/sal-binding-api/src/main/java/org/opendaylight/controller/sal/binding/api/data/DataModificationTransaction.java index e1055c0970..b769812f2b 100644 --- a/opendaylight/md-sal/sal-binding-api/src/main/java/org/opendaylight/controller/sal/binding/api/data/DataModificationTransaction.java +++ b/opendaylight/md-sal/sal-binding-api/src/main/java/org/opendaylight/controller/sal/binding/api/data/DataModificationTransaction.java @@ -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. * diff --git a/opendaylight/md-sal/sal-binding-api/src/main/java/org/opendaylight/controller/sal/binding/api/mount/MountProviderService.java b/opendaylight/md-sal/sal-binding-api/src/main/java/org/opendaylight/controller/sal/binding/api/mount/MountProviderService.java index 6af9093fdd..9eb704f19f 100644 --- a/opendaylight/md-sal/sal-binding-api/src/main/java/org/opendaylight/controller/sal/binding/api/mount/MountProviderService.java +++ b/opendaylight/md-sal/sal-binding-api/src/main/java/org/opendaylight/controller/sal/binding/api/mount/MountProviderService.java @@ -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 registerProvisionListener(MountProvisionListener listener); - public interface MountProvisionListener extends EventListener { + interface MountProvisionListener extends EventListener { void onMountPointCreated(InstanceIdentifier path);