Adjust to yangtools-2.0.0/odlparent-3.0.0 changes
[netconf.git] / netconf / callhome-provider / src / main / java / org / opendaylight / netconf / callhome / mount / IetfZeroTouchCallHomeServerProvider.java
index e8b96e671b47b724bd05d35ab061db9e476fb6b5..987fcc03646c64f3806674a533986c8cf96d8db6 100644 (file)
@@ -62,7 +62,8 @@ public class IetfZeroTouchCallHomeServerProvider implements AutoCloseable, DataT
     private int port = 0; // 0 = use default in NetconfCallHomeBuilder
     private final CallhomeStatusReporter statusReporter;
 
-    public IetfZeroTouchCallHomeServerProvider(DataBroker dataBroker, CallHomeMountDispatcher mountDispacher) {
+    public IetfZeroTouchCallHomeServerProvider(final DataBroker dataBroker,
+            final CallHomeMountDispatcher mountDispacher) {
         this.dataBroker = dataBroker;
         this.mountDispacher = mountDispacher;
         this.authProvider = new CallHomeAuthProviderImpl(dataBroker);
@@ -82,7 +83,7 @@ public class IetfZeroTouchCallHomeServerProvider implements AutoCloseable, DataT
         }
     }
 
-    public void setPort(String portStr) {
+    public void setPort(final String portStr) {
         try {
             Configuration configuration = new Configuration();
             configuration.set(CALL_HOME_PORT_KEY, portStr);
@@ -112,7 +113,7 @@ public class IetfZeroTouchCallHomeServerProvider implements AutoCloseable, DataT
     }
 
     @VisibleForTesting
-    void assertValid(Object obj, String description) {
+    void assertValid(final Object obj, final String description) {
         if (obj == null) {
             throw new RuntimeException(
                     String.format("Failed to find %s in IetfZeroTouchCallHomeProvider.initialize()", description));
@@ -136,7 +137,7 @@ public class IetfZeroTouchCallHomeServerProvider implements AutoCloseable, DataT
     }
 
     @Override
-    public void onDataTreeChanged(@Nonnull Collection<DataTreeModification<AllowedDevices>> changes) {
+    public void onDataTreeChanged(@Nonnull final Collection<DataTreeModification<AllowedDevices>> changes) {
         // In case of any changes to the devices datatree, register the changed values with callhome server
         // As of now, no way to add a new callhome client key to the CallHomeAuthorization instance since
         // its created under CallHomeAuthorizationProvider.
@@ -169,7 +170,7 @@ public class IetfZeroTouchCallHomeServerProvider implements AutoCloseable, DataT
         }
     }
 
-    private void handleDeletedDevices(Set<InstanceIdentifier<?>> deletedDevices) {
+    private void handleDeletedDevices(final Set<InstanceIdentifier<?>> deletedDevices) {
         if (deletedDevices.isEmpty()) {
             return;
         }
@@ -188,8 +189,8 @@ public class IetfZeroTouchCallHomeServerProvider implements AutoCloseable, DataT
         }
     }
 
-    private List<Device> getReadDevices(
-            ListenableFuture<Optional<AllowedDevices>> devicesFuture) throws InterruptedException, ExecutionException {
+    private static List<Device> getReadDevices(final ListenableFuture<Optional<AllowedDevices>> devicesFuture)
+            throws InterruptedException, ExecutionException {
         Optional<AllowedDevices> opt = devicesFuture.get();
         return opt.isPresent() ? opt.get().getDevice() : Collections.emptyList();
     }