Mechanical code cleanup (config) 66/46066/3
authorStephen Kitt <skitt@redhat.com>
Thu, 22 Sep 2016 15:12:00 +0000 (17:12 +0200)
committerTom Pantelis <tpanteli@brocade.com>
Fri, 23 Sep 2016 18:36:44 +0000 (18:36 +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: Iefd8363a5eb120fdd43a4632b9e3db0e7e347dba
Signed-off-by: Stephen Kitt <skitt@redhat.com>
55 files changed:
opendaylight/config/config-api/src/main/java/org/opendaylight/controller/config/api/ConfigRegistry.java
opendaylight/config/config-api/src/main/java/org/opendaylight/controller/config/api/RuntimeBeanRegistratorAwareModule.java
opendaylight/config/config-api/src/main/java/org/opendaylight/controller/config/api/annotations/AbstractServiceInterface.java
opendaylight/config/config-api/src/main/java/org/opendaylight/controller/config/api/jmx/notifications/ConfigJMXNotification.java
opendaylight/config/config-api/src/main/java/org/opendaylight/controller/config/api/osgi/WaitingServiceTracker.java
opendaylight/config/config-api/src/main/java/org/opendaylight/controller/config/spi/Module.java
opendaylight/config/config-api/src/main/java/org/opendaylight/controller/config/spi/ModuleFactory.java
opendaylight/config/config-manager-facade-xml/src/main/java/org/opendaylight/controller/config/facade/xml/mapping/attributes/fromxml/AttributeReadingStrategy.java
opendaylight/config/config-manager-facade-xml/src/main/java/org/opendaylight/controller/config/facade/xml/mapping/attributes/mapping/SimpleAttributeMappingStrategy.java
opendaylight/config/config-manager-facade-xml/src/main/java/org/opendaylight/controller/config/facade/xml/mapping/attributes/resolving/ArrayAttributeResolvingStrategy.java
opendaylight/config/config-manager-facade-xml/src/main/java/org/opendaylight/controller/config/facade/xml/mapping/attributes/resolving/SimpleAttributeResolvingStrategy.java
opendaylight/config/config-manager-facade-xml/src/main/java/org/opendaylight/controller/config/facade/xml/mapping/config/Config.java
opendaylight/config/config-manager-facade-xml/src/main/java/org/opendaylight/controller/config/facade/xml/osgi/YangStoreActivator.java
opendaylight/config/config-manager-facade-xml/src/main/java/org/opendaylight/controller/config/facade/xml/osgi/YangStoreService.java
opendaylight/config/config-manager/src/main/java/org/opendaylight/controller/config/manager/impl/dependencyresolver/DependencyResolverImpl.java
opendaylight/config/config-manager/src/main/java/org/opendaylight/controller/config/manager/impl/dynamicmbean/AnnotationsHelper.java
opendaylight/config/config-manager/src/main/java/org/opendaylight/controller/config/manager/impl/dynamicmbean/AttributeHolder.java
opendaylight/config/config-manager/src/main/java/org/opendaylight/controller/config/manager/impl/dynamicmbean/ReadOnlyAtomicBoolean.java
opendaylight/config/config-manager/src/main/java/org/opendaylight/controller/config/manager/impl/jmx/ServiceReferenceRegistrator.java
opendaylight/config/config-manager/src/main/java/org/opendaylight/controller/config/manager/impl/osgi/BlankTransactionServiceTracker.java
opendaylight/config/config-manager/src/main/java/org/opendaylight/controller/config/manager/impl/osgi/ExtensibleBundleTracker.java
opendaylight/config/config-manager/src/test/java/org/opendaylight/controller/config/manager/impl/AbstractConfigTest.java
opendaylight/config/config-manager/src/test/java/org/opendaylight/controller/config/manager/impl/AbstractLockedPlatformMBeanServerTest.java
opendaylight/config/config-manager/src/test/java/org/opendaylight/controller/config/manager/impl/ClassBasedModuleFactory.java
opendaylight/config/config-manager/src/test/java/org/opendaylight/controller/config/manager/impl/dynamicmbean/AnnotationsTest.java
opendaylight/config/config-manager/src/test/java/org/opendaylight/controller/config/manager/testingservices/parallelapsp/TestingParallelAPSPConfigMXBean.java
opendaylight/config/config-manager/src/test/java/org/opendaylight/controller/config/manager/testingservices/parallelapsp/TestingParallelAPSPModuleFactory.java
opendaylight/config/config-manager/src/test/java/org/opendaylight/controller/config/manager/testingservices/parallelapsp/test/MockedDependenciesTest.java
opendaylight/config/config-manager/src/test/java/org/opendaylight/controller/config/manager/testingservices/scheduledthreadpool/TestingScheduledThreadPoolConfigBeanMXBean.java
opendaylight/config/config-manager/src/test/java/org/opendaylight/controller/config/manager/testingservices/scheduledthreadpool/TestingScheduledThreadPoolModuleFactory.java
opendaylight/config/config-manager/src/test/java/org/opendaylight/controller/config/manager/testingservices/seviceinterface/TestingThreadPoolServiceInterface.java
opendaylight/config/config-manager/src/test/java/org/opendaylight/controller/config/manager/testingservices/threadpool/TestingFixedThreadPoolConfigMXBean.java
opendaylight/config/config-manager/src/test/java/org/opendaylight/controller/config/manager/testingservices/threadpool/TestingFixedThreadPoolModuleFactory.java
opendaylight/config/config-manager/src/test/java/org/opendaylight/controller/config/manager/testingservices/threadpool/TestingThreadPoolConfigMXBean.java
opendaylight/config/config-persister-api/src/main/java/org/opendaylight/controller/config/persist/api/ConfigPusher.java
opendaylight/config/config-persister-feature-adapter/src/main/java/org/opendaylight/controller/configpusherfeature/ConfigPusherFeatureActivator.java
opendaylight/config/config-persister-feature-adapter/src/main/java/org/opendaylight/controller/configpusherfeature/internal/ChildAwareFeatureWrapper.java
opendaylight/config/config-persister-feature-adapter/src/main/java/org/opendaylight/controller/configpusherfeature/internal/ConfigFeaturesListener.java
opendaylight/config/config-persister-feature-adapter/src/main/java/org/opendaylight/controller/configpusherfeature/internal/ConfigPusherCustomizer.java
opendaylight/config/config-persister-feature-adapter/src/main/java/org/opendaylight/controller/configpusherfeature/internal/ConfigPushingRunnable.java
opendaylight/config/config-persister-feature-adapter/src/main/java/org/opendaylight/controller/configpusherfeature/internal/FeatureConfigPusher.java
opendaylight/config/config-persister-feature-adapter/src/main/java/org/opendaylight/controller/configpusherfeature/internal/FeatureConfigSnapshotHolder.java
opendaylight/config/config-persister-impl/src/main/java/org/opendaylight/controller/config/persist/impl/ConfigPusherImpl.java
opendaylight/config/config-util/src/main/java/org/opendaylight/controller/config/util/capability/Capability.java
opendaylight/config/config-util/src/test/java/org/opendaylight/controller/config/util/TestingConfigTransactionController.java
opendaylight/config/logback-config/src/main/java/org/opendaylight/controller/config/yang/logback/config/ContextSetter.java
opendaylight/config/netty-event-executor-config/src/main/java/org/opendaylight/controller/config/yang/netty/eventexecutor/AutoCloseableEventExecutor.java
opendaylight/config/netty-threadgroup-config/src/main/java/org/opendaylight/controller/config/yang/netty/threadgroup/NettyThreadgroupModule.java
opendaylight/config/netty-timer-config/src/main/java/org/opendaylight/controller/config/yang/netty/timer/HashedWheelTimerModule.java
opendaylight/config/threadpool-config-api/src/main/java/org/opendaylight/controller/config/threadpool/ScheduledThreadPool.java
opendaylight/config/threadpool-config-api/src/main/java/org/opendaylight/controller/config/threadpool/ThreadPool.java
opendaylight/config/threadpool-config-impl/src/main/java/org/opendaylight/controller/config/threadpool/util/FlexibleThreadPoolWrapper.java
opendaylight/config/yang-jmx-generator/src/test/java/org/opendaylight/controller/config/yangjmxgenerator/ModuleMXBeanEntryNameConflictTest.java
opendaylight/config/yang-jmx-generator/src/test/java/org/opendaylight/controller/config/yangjmxgenerator/ModuleMXBeanEntryTest.java
opendaylight/config/yang-jmx-generator/src/test/java/org/opendaylight/controller/config/yangjmxgenerator/RuntimeBeanEntryTest.java

index 96fa1ae0c62fa6ba660d73394b814f17123b7212..275858cbedc5742f56f1a4478dd942d0139b88bb 100644 (file)
@@ -23,8 +23,8 @@ public interface ConfigRegistry extends LookupRegistry, ServiceReferenceReadable
      * Only well-known ObjectName in configuration system, under which
      * ConfigRegisry is registered.
      */
      * Only well-known ObjectName in configuration system, under which
      * ConfigRegisry is registered.
      */
-    public static final ObjectName OBJECT_NAME = ConfigRegistryConstants.OBJECT_NAME;
-    public static final ObjectName OBJECT_NAME_NO_NOTIFICATIONS = ConfigRegistryConstants.OBJECT_NAME_NO_NOTIFICATIONS;
+    ObjectName OBJECT_NAME = ConfigRegistryConstants.OBJECT_NAME;
+    ObjectName OBJECT_NAME_NO_NOTIFICATIONS = ConfigRegistryConstants.OBJECT_NAME_NO_NOTIFICATIONS;
 
     /**
      * Opens new configuration transaction.
 
     /**
      * Opens new configuration transaction.
index 2e6e0f34e6a46722dc2cc74b05ebbcbe46e996f5..41673bce721a6d028b50fd4172a10d6a9236e8d0 100644 (file)
@@ -23,7 +23,7 @@ public interface RuntimeBeanRegistratorAwareModule extends Module {
      *
      * @param rootRuntimeBeanRegistrator
      */
      *
      * @param rootRuntimeBeanRegistrator
      */
-    public void setRuntimeBeanRegistrator(
+    void setRuntimeBeanRegistrator(
             RootRuntimeBeanRegistrator rootRuntimeBeanRegistrator);
 
 }
             RootRuntimeBeanRegistrator rootRuntimeBeanRegistrator);
 
 }
index 261c5f5841f1479370d016d878cfa9c2be4f26f4..0b1d7872fc50021687b984b48d80951062721e3d 100644 (file)
@@ -13,5 +13,5 @@ package org.opendaylight.controller.config.api.annotations;
  * one SI can extend another one, in which case all annotations in hierarchy
  * will be observed.
  */
  * one SI can extend another one, in which case all annotations in hierarchy
  * will be observed.
  */
-public abstract interface AbstractServiceInterface {
+public interface AbstractServiceInterface {
 }
 }
index 0d9e5497207ba45f7a3ecd1221f5ea8994b346bc..13efafb79d9f23da2d13c65771352fb2e80201dc 100644 (file)
@@ -58,7 +58,7 @@ public abstract class ConfigJMXNotification extends Notification {
     }
 
     enum NotificationType {
     }
 
     enum NotificationType {
-        COMMIT;
+        COMMIT
     }
 
 }
     }
 
 }
index 1549e6b26a4d715d70dbe31b1c4a1f9891fd9301..d6abc64dda0571e0014c6f0fa9541844cdd71a9a 100644 (file)
@@ -66,7 +66,7 @@ public final class WaitingServiceTracker<T> implements AutoCloseable {
     public static <T> WaitingServiceTracker<T> create(@Nonnull Class<T> serviceInterface, @Nonnull BundleContext context) {
         ServiceTracker<T, ?> tracker = new ServiceTracker<>(context, serviceInterface, null);
         tracker.open();
     public static <T> WaitingServiceTracker<T> create(@Nonnull Class<T> serviceInterface, @Nonnull BundleContext context) {
         ServiceTracker<T, ?> tracker = new ServiceTracker<>(context, serviceInterface, null);
         tracker.open();
-        return new WaitingServiceTracker<T>(serviceInterface, tracker);
+        return new WaitingServiceTracker<>(serviceInterface, tracker);
     }
 
     /**
     }
 
     /**
@@ -83,7 +83,7 @@ public final class WaitingServiceTracker<T> implements AutoCloseable {
         try {
             ServiceTracker<T, ?> tracker = new ServiceTracker<>(context, context.createFilter(newFilter), null);
             tracker.open();
         try {
             ServiceTracker<T, ?> tracker = new ServiceTracker<>(context, context.createFilter(newFilter), null);
             tracker.open();
-            return new WaitingServiceTracker<T>(serviceInterface, tracker);
+            return new WaitingServiceTracker<>(serviceInterface, tracker);
         } catch(InvalidSyntaxException e) {
             throw new IllegalArgumentException(String.format("Invalid OSGi filter %s", newFilter), e);
         }
         } catch(InvalidSyntaxException e) {
             throw new IllegalArgumentException(String.format("Invalid OSGi filter %s", newFilter), e);
         }
index 53f03a2398ef9cf8b854fd0bcc7e6959b8304ba5..4766ad8a47d3ce2c9ffc1a6f81ea11bf3818905a 100644 (file)
@@ -64,7 +64,7 @@ public interface Module extends Identifiable<ModuleIdentifier>{
      * @param oldModule old instance of Module
      * @return true if the instance produced by oldModule can be reused with current instance as well.
      */
      * @param oldModule old instance of Module
      * @return true if the instance produced by oldModule can be reused with current instance as well.
      */
-    public boolean canReuse(Module oldModule);
+    boolean canReuse(Module oldModule);
 
 
 }
 
 
 }
index e28608a198f2ea6346397fa86f28b2cf833d5db6..99263632651e21f26dad4d80880e65eff3d63689 100644 (file)
@@ -32,7 +32,7 @@ public interface ModuleFactory {
      *
      * @return human-friendly implementation name
      */
      *
      * @return human-friendly implementation name
      */
-    public String getImplementationName();
+    String getImplementationName();
 
     /**
      * Create a new Module instance. The returned object is expected to use the
 
     /**
      * Create a new Module instance. The returned object is expected to use the
@@ -49,7 +49,7 @@ public interface ModuleFactory {
      * @return newly created module
      *
      */
      * @return newly created module
      *
      */
-    public Module createModule(String instanceName,
+    Module createModule(String instanceName,
             DependencyResolver dependencyResolver, BundleContext bundleContext);
 
     /**
             DependencyResolver dependencyResolver, BundleContext bundleContext);
 
     /**
@@ -90,7 +90,7 @@ public interface ModuleFactory {
      *             leaves server in a running state but no configuration
      *             transaction can be created.
      */
      *             leaves server in a running state but no configuration
      *             transaction can be created.
      */
-    public Module createModule(String instanceName, DependencyResolver dependencyResolver,
+    Module createModule(String instanceName, DependencyResolver dependencyResolver,
             DynamicMBeanWithInstance old, BundleContext bundleContext) throws Exception;
 
     boolean isModuleImplementingServiceInterface(
             DynamicMBeanWithInstance old, BundleContext bundleContext) throws Exception;
 
     boolean isModuleImplementingServiceInterface(
@@ -112,7 +112,7 @@ public interface ModuleFactory {
      *
      * @return set of default modules. Null is not allowed.
      */
      *
      * @return set of default modules. Null is not allowed.
      */
-    public Set<? extends Module> getDefaultModules(DependencyResolverFactory dependencyResolverFactory,
+    Set<? extends Module> getDefaultModules(DependencyResolverFactory dependencyResolverFactory,
             BundleContext bundleContext);
 
 }
             BundleContext bundleContext);
 
 }
index 368f3dc5058cdbcfef8246e63d7dcef172ed23dc..eeb538bd5f0050cb3cc4c8bffb223a50b5859efc 100644 (file)
@@ -14,6 +14,6 @@ import org.opendaylight.controller.config.util.xml.XmlElement;
 
 public interface AttributeReadingStrategy {
 
 
 public interface AttributeReadingStrategy {
 
-    public abstract AttributeConfigElement readElement(List<XmlElement> element) throws DocumentedException;
+    AttributeConfigElement readElement(List<XmlElement> element) throws DocumentedException;
 
 }
 
 }
index 9acc4dd1f6b7f65d5f4852ae3eeb9a8f3893cbbc..5b9c2a2b2fcb05d39bc26e456b84c6237526acfb 100644 (file)
@@ -48,7 +48,7 @@ public class SimpleAttributeMappingStrategy extends AbstractAttributeMappingStra
     /**
      * Custom writer plugins must implement this interface.
      */
     /**
      * Custom writer plugins must implement this interface.
      */
-    static interface WriterPlugin {
+    interface WriterPlugin {
         String writeObject(Object value);
     }
 
         String writeObject(Object value);
     }
 
index 021e065e7ed0541f30081d77e61ab49201672b0a..73b9dd9cbce28dfc9997550b924b3c32bbe20f9d 100644 (file)
@@ -77,7 +77,8 @@ final class ArrayAttributeResolvingStrategy extends AbstractAttributeResolvingSt
         // Rebuild open type. Underlying composite types might have changed
         if (innerTypeResolvingStrategy.getOpenType() instanceof CompositeType) {
             try {
         // Rebuild open type. Underlying composite types might have changed
         if (innerTypeResolvingStrategy.getOpenType() instanceof CompositeType) {
             try {
-                final ArrayType<?> openType = new ArrayType<Object>(getOpenType().getDimension(), innerTypeResolvingStrategy.getOpenType());
+                final ArrayType<?> openType =
+                        new ArrayType<>(getOpenType().getDimension(), innerTypeResolvingStrategy.getOpenType());
                 setOpenType(openType);
             } catch (OpenDataException e) {
                 throw new IllegalStateException("An error occurred during restoration of array type " + this
                 setOpenType(openType);
             } catch (OpenDataException e) {
                 throw new IllegalStateException("An error occurred during restoration of array type " + this
index 38f58ea9a1a78b92809aafd0530f5a4e0ac0fe06..6c53b80872cc7715f0e444f1084fe0e3662bd2c0 100644 (file)
@@ -71,7 +71,7 @@ final class SimpleAttributeResolvingStrategy extends AbstractAttributeResolvingS
         resolverPlugins.put(BigDecimal.class.getCanonicalName(), new BigDecimalResolver());
     }
 
         resolverPlugins.put(BigDecimal.class.getCanonicalName(), new BigDecimalResolver());
     }
 
-    static interface Resolver {
+    interface Resolver {
         Object resolveObject(Class<?> type, String attrName, String value) throws DocumentedException;
     }
 
         Object resolveObject(Class<?> type, String attrName, String value) throws DocumentedException;
     }
 
index 9bee7a10854beeea35bf07a10b17a89256fba65e..30726db82e4d039a894cff349dc590335b0ade8b 100644 (file)
@@ -293,7 +293,7 @@ public class Config {
     }
 
     private interface ResolvingStrategy<T> {
     }
 
     private interface ResolvingStrategy<T> {
-        public T resolveElement(ModuleConfig moduleMapping, XmlElement moduleElement, ServiceRegistryWrapper serviceTracker,
-                                String instanceName, String moduleNamespace, EditStrategyType defaultStrategy) throws DocumentedException;
+        T resolveElement(ModuleConfig moduleMapping, XmlElement moduleElement, ServiceRegistryWrapper serviceTracker,
+                String instanceName, String moduleNamespace, EditStrategyType defaultStrategy) throws DocumentedException;
     }
 }
     }
 }
index 32e064a27a3f4e64ca25c9e87c611135615088cc..4c5674a57a7b0d277522294f21db3c9ec311ba4b 100644 (file)
@@ -81,7 +81,8 @@ public class YangStoreActivator implements BundleActivator {
                     yangStoreService.refresh(runtimeContext);
                 }
 
                     yangStoreService.refresh(runtimeContext);
                 }
 
-                yangStoreServiceServiceRegistration = context.registerService(YangStoreService.class, yangStoreService, new Hashtable<String, Object>());
+                yangStoreServiceServiceRegistration = context.registerService(YangStoreService.class, yangStoreService,
+                        new Hashtable<>());
                 configRegistryLookup = new ConfigRegistryLookupThread(yangStoreService);
                 configRegistryLookup.start();
                 return yangStoreService;
                 configRegistryLookup = new ConfigRegistryLookupThread(yangStoreService);
                 configRegistryLookup.start();
                 return yangStoreService;
@@ -186,7 +187,8 @@ public class YangStoreActivator implements BundleActivator {
 
             final ConfigSubsystemFacadeFactory configSubsystemFacade =
                     new ConfigSubsystemFacadeFactory(jmxClient, jmxClientNoNotifications, yangStoreService);
 
             final ConfigSubsystemFacadeFactory configSubsystemFacade =
                     new ConfigSubsystemFacadeFactory(jmxClient, jmxClientNoNotifications, yangStoreService);
-            osgiRegistrayion = context.registerService(ConfigSubsystemFacadeFactory.class, configSubsystemFacade, new Hashtable<String, Object>());
+            osgiRegistrayion = context.registerService(ConfigSubsystemFacadeFactory.class, configSubsystemFacade,
+                    new Hashtable<>());
         }
     }
 }
         }
     }
 }
index 969b1296d1bacf4d4ad5843ec4c929c7545439ea..f89d26b0cd1b426e6fb765b2e962ca4e7bdd05ee 100644 (file)
@@ -43,7 +43,7 @@ public class YangStoreService implements YangStoreContext {
      * of the listener set.
      */
     @GuardedBy("listeners")
      * of the listener set.
      */
     @GuardedBy("listeners")
-    private final Set<ModuleListener> listeners = new HashSet<ModuleListener>();
+    private final Set<ModuleListener> listeners = new HashSet<>();
 
     /**
      * This is the latest snapshot. Some of its state is always initialized, but the MXBean maps potentially cause
 
     /**
      * This is the latest snapshot. Some of its state is always initialized, but the MXBean maps potentially cause
index 8948c56e9b1dfd1bcaa1b07c1d093235790193c4..10128a2f5532563dc278a38d18d47322b1d4bd09 100644 (file)
@@ -257,7 +257,7 @@ final class DependencyResolverImpl implements DependencyResolver,
         transactionStatus.checkCommitStarted();
         if (maxDependencyDepth == null) {
             maxDependencyDepth = getMaxDepth(this, manager,
         transactionStatus.checkCommitStarted();
         if (maxDependencyDepth == null) {
             maxDependencyDepth = getMaxDepth(this, manager,
-                    new LinkedHashSet<ModuleIdentifier>());
+                    new LinkedHashSet<>());
         }
     }
 
         }
     }
 
index fba9844dbfaf9d7fc8cef7ed54e223c73c7431b2..7fa70ca10a3d2a3b1c734ff9b97ca1ced7f547e1 100644 (file)
@@ -78,7 +78,7 @@ public class AnnotationsHelper {
      */
     static <T extends Annotation> List<T> findClassAnnotationInSuperClassesAndIfcs(
             final Class<?> clazz, final Class<T> annotationType, final Set<Class<?>> interfaces) {
      */
     static <T extends Annotation> List<T> findClassAnnotationInSuperClassesAndIfcs(
             final Class<?> clazz, final Class<T> annotationType, final Set<Class<?>> interfaces) {
-        List<T> result = new ArrayList<T>();
+        List<T> result = new ArrayList<>();
         Class<?> declaringClass = clazz;
         do {
             T annotation = declaringClass.getAnnotation(annotationType);
         Class<?> declaringClass = clazz;
         do {
             T annotation = declaringClass.getAnnotation(annotationType);
index 35ba29ed176b4593fceb6577bff77af11254b25c..8618456cf877e44e39c1f55e6a35f9c38bed907b 100644 (file)
@@ -131,7 +131,7 @@ class AttributeHolder {
                 .findMethodAnnotationInSuperClassesAndIfcs(setter, RequireInterface.class, inspectedInterfaces);
         // make sure the list if not empty contains always annotation with same
         // value
                 .findMethodAnnotationInSuperClassesAndIfcs(setter, RequireInterface.class, inspectedInterfaces);
         // make sure the list if not empty contains always annotation with same
         // value
-        Set<Class<?>> foundValues = new HashSet<Class<?>>();
+        Set<Class<?>> foundValues = new HashSet<>();
         for (RequireInterface ri : foundRequireInterfaces) {
             foundValues.add(ri.value());
         }
         for (RequireInterface ri : foundRequireInterfaces) {
             foundValues.add(ri.value());
         }
index deccde0f245607f86d3c78f9be43b12163d326ad..583e8b46e8ab8402cd23765bac5506c3dbbb1121 100644 (file)
@@ -12,7 +12,7 @@ import java.util.concurrent.atomic.AtomicBoolean;
 public interface ReadOnlyAtomicBoolean {
     boolean get();
 
 public interface ReadOnlyAtomicBoolean {
     boolean get();
 
-    public static class ReadOnlyAtomicBooleanImpl implements
+    class ReadOnlyAtomicBooleanImpl implements
             ReadOnlyAtomicBoolean {
         private final AtomicBoolean atomicBoolean;
 
             ReadOnlyAtomicBoolean {
         private final AtomicBoolean atomicBoolean;
 
index f1ceb7e2272e0bc19d7cfc814c4935d98c91ad5a..eafe760ddc1f029d3e9ea471282efd0693a62225 100644 (file)
@@ -13,7 +13,7 @@ import org.opendaylight.controller.config.api.jmx.ObjectNameUtil;
 
 public interface ServiceReferenceRegistrator extends AutoCloseable {
 
 
 public interface ServiceReferenceRegistrator extends AutoCloseable {
 
-    public String getNullableTransactionName();
+    String getNullableTransactionName();
 
     ServiceReferenceJMXRegistration registerMBean(ServiceReferenceMXBeanImpl object,
                                                           ObjectName on) throws InstanceAlreadyExistsException;
 
     ServiceReferenceJMXRegistration registerMBean(ServiceReferenceMXBeanImpl object,
                                                           ObjectName on) throws InstanceAlreadyExistsException;
@@ -21,7 +21,7 @@ public interface ServiceReferenceRegistrator extends AutoCloseable {
     @Override
     void close();
 
     @Override
     void close();
 
-    public static class ServiceReferenceJMXRegistration implements AutoCloseable {
+    class ServiceReferenceJMXRegistration implements AutoCloseable {
         private final InternalJMXRegistration registration;
 
         ServiceReferenceJMXRegistration(InternalJMXRegistration registration) {
         private final InternalJMXRegistration registration;
 
         ServiceReferenceJMXRegistration(InternalJMXRegistration registration) {
@@ -34,11 +34,11 @@ public interface ServiceReferenceRegistrator extends AutoCloseable {
         }
     }
 
         }
     }
 
-    public static interface ServiceReferenceTransactionRegistratorFactory {
-        public ServiceReferenceRegistrator create();
+    interface ServiceReferenceTransactionRegistratorFactory {
+        ServiceReferenceRegistrator create();
     }
 
     }
 
-    public static class ServiceReferenceRegistratorImpl implements ServiceReferenceRegistrator {
+    class ServiceReferenceRegistratorImpl implements ServiceReferenceRegistrator {
         private final InternalJMXRegistrator currentJMXRegistrator;
         private final String nullableTransactionName;
 
         private final InternalJMXRegistrator currentJMXRegistrator;
         private final String nullableTransactionName;
 
@@ -73,13 +73,13 @@ public interface ServiceReferenceRegistrator extends AutoCloseable {
         public void close() {
             currentJMXRegistrator.close();
         }
         public void close() {
             currentJMXRegistrator.close();
         }
-        public static interface ServiceReferenceTransactionRegistratorFactory {
-            public ServiceReferenceRegistrator create();
+        public interface ServiceReferenceTransactionRegistratorFactory {
+            ServiceReferenceRegistrator create();
         }
     }
 
 
         }
     }
 
 
-    public static class ServiceReferenceTransactionRegistratorFactoryImpl implements ServiceReferenceTransactionRegistratorFactory {
+    class ServiceReferenceTransactionRegistratorFactoryImpl implements ServiceReferenceTransactionRegistratorFactory {
         private final NestableJMXRegistrator parentRegistrator;
         private final String nullableTransactionName;
 
         private final NestableJMXRegistrator parentRegistrator;
         private final String nullableTransactionName;
 
index fa46cae5167925c4bf7e459d21a7dc150a1ff92f..6c7f38b87dd94d9e64f93c1aef8b18a2246ac73e 100644 (file)
@@ -108,7 +108,7 @@ public class BlankTransactionServiceTracker implements ServiceTrackerCustomizer<
     }
 
     @VisibleForTesting
     }
 
     @VisibleForTesting
-    static interface BlankTransaction {
+    interface BlankTransaction {
         CommitStatus hit() throws ValidationException, ConflictingVersionException;
     }
 }
         CommitStatus hit() throws ValidationException, ConflictingVersionException;
     }
 }
index 31bd5fa25ee7f3652098bc1c1f840bf384c411e1..a0d9122ac6f121e2110455e9cf196103c8ddc245 100644 (file)
@@ -132,7 +132,7 @@ public final class ExtensibleBundleTracker<T> extends BundleTracker<Future<T>> {
         }
     }
 
         }
     }
 
-    private static interface BundleStrategy {
+    private interface BundleStrategy {
         void execute(BundleTrackerCustomizer<?> tracker);
     }
 
         void execute(BundleTrackerCustomizer<?> tracker);
     }
 
index 38ff0d9f87a39e0126536d3a2e06dc269c13929f..d65133c783e4bf31ba97c90a8e71fef2a561938a 100644 (file)
@@ -203,7 +203,7 @@ public abstract class AbstractConfigTest extends AbstractLockedPlatformMBeanServ
         return mock(BindingRuntimeContext.class);
     }
 
         return mock(BindingRuntimeContext.class);
     }
 
-    public static interface BundleContextServiceRegistrationHandler {
+    public interface BundleContextServiceRegistrationHandler {
         void handleServiceRegistration(Class<?> clazz, Object serviceInstance, Dictionary<String, ?> props);
     }
 
         void handleServiceRegistration(Class<?> clazz, Object serviceInstance, Dictionary<String, ?> props);
     }
 
index 4c896e7e830cc67db4914495dba4d9bb8152dace..fbb3d555ccfbf05b68871a97a3dadc780af16e2c 100644 (file)
@@ -35,7 +35,7 @@ public abstract class AbstractLockedPlatformMBeanServerTest {
 
     }
 
 
     }
 
-    public static interface SimpleBeanMBean {
+    public interface SimpleBeanMBean {
 
     }
 
 
     }
 
index 3c237d37f00f52ecde36938b87d9478dcd835b13..170878a6ed4614cef12a833362f91c6fef920d81 100644 (file)
@@ -105,7 +105,7 @@ public class ClassBasedModuleFactory implements ModuleFactory {
 
     @Override
     public Set<Module> getDefaultModules(DependencyResolverFactory dependencyResolverFactory, BundleContext bundleContext) {
 
     @Override
     public Set<Module> getDefaultModules(DependencyResolverFactory dependencyResolverFactory, BundleContext bundleContext) {
-        return new HashSet<Module>();
+        return new HashSet<>();
     }
 
     @Override
     }
 
     @Override
index 853f8c090d2fa45b40ee78214139ecdf9c0188d9..029b347ccaa20f578a90ff21c2e42a782b9e599f 100644 (file)
@@ -96,7 +96,7 @@ public class AnnotationsTest {
 
     @ServiceInterfaceAnnotation(value = SIMPLE, osgiRegistrationType = Executor.class,
         namespace = "ns", revision = "rev", localName = SIMPLE)
 
     @ServiceInterfaceAnnotation(value = SIMPLE, osgiRegistrationType = Executor.class,
         namespace = "ns", revision = "rev", localName = SIMPLE)
-    static interface SimpleSI extends AbstractServiceInterface {
+    interface SimpleSI extends AbstractServiceInterface {
 
     }
 
 
     }
 
@@ -155,14 +155,13 @@ public class AnnotationsTest {
                 emptySetOfInterfaces(), "class");
     }
 
                 emptySetOfInterfaces(), "class");
     }
 
-    static interface SubSI extends SimpleSI {
+    interface SubSI extends SimpleSI {
 
     }
 
     @ServiceInterfaceAnnotation(value = SUBCLASS2, osgiRegistrationType = ExecutorService.class,
         namespace = "ns", revision = "rev", localName = SUBCLASS2)
 
     }
 
     @ServiceInterfaceAnnotation(value = SUBCLASS2, osgiRegistrationType = ExecutorService.class,
         namespace = "ns", revision = "rev", localName = SUBCLASS2)
-
-    static interface SubSI2 extends SubSI {
+    interface SubSI2 extends SubSI {
 
     }
 
 
     }
 
@@ -192,7 +191,7 @@ public class AnnotationsTest {
         }
     }
 
         }
     }
 
-    public static interface HasSomeMethod {
+    public interface HasSomeMethod {
         void setSomething(ObjectName objectName);
     }
 
         void setSomething(ObjectName objectName);
     }
 
@@ -245,7 +244,7 @@ public class AnnotationsTest {
     }
 
     @Description("class")
     }
 
     @Description("class")
-    static interface HasSomeMethodWithAnnotations {
+    interface HasSomeMethodWithAnnotations {
 
         @RequireInterface(SubSI2.class)
         @Description("descr")
 
         @RequireInterface(SubSI2.class)
         @Description("descr")
@@ -273,7 +272,7 @@ public class AnnotationsTest {
 
         assertDescriptionOnClass(
                 HasSomeMethodWithAnnotationsImpl.class,
 
         assertDescriptionOnClass(
                 HasSomeMethodWithAnnotationsImpl.class,
-                new HashSet<Class<?>>(Arrays
+                new HashSet<>(Arrays
                         .asList(HasSomeMethodWithAnnotations.class)), "class");
     }
 
                         .asList(HasSomeMethodWithAnnotations.class)), "class");
     }
 
index d838e7b93eb33d377c06e2d0da165924d0529f70..68f6102987fcb3c8a433df82bf06f70bd5cde190 100644 (file)
@@ -14,7 +14,7 @@ import org.opendaylight.controller.config.api.annotations.ServiceInterfaceAnnota
     namespace = "namespace", revision = "rev", localName = TestingParallelAPSPConfigMXBean.NAME)
 public interface TestingParallelAPSPConfigMXBean {
 
     namespace = "namespace", revision = "rev", localName = TestingParallelAPSPConfigMXBean.NAME)
 public interface TestingParallelAPSPConfigMXBean {
 
-    static final String NAME = "apsp";
+    String NAME = "apsp";
 
     ObjectName getThreadPool();
 
 
     ObjectName getThreadPool();
 
index 89b70e3e7ab4fca00351a71dbcd5f75efcd87041..b08cdcb20d2e11e804576688858957eaecf17172 100644 (file)
@@ -67,7 +67,7 @@ public class TestingParallelAPSPModuleFactory implements ModuleFactory {
 
     @Override
     public Set<Module> getDefaultModules(DependencyResolverFactory dependencyResolverFactory, BundleContext context) {
 
     @Override
     public Set<Module> getDefaultModules(DependencyResolverFactory dependencyResolverFactory, BundleContext context) {
-        return new HashSet<Module>();
+        return new HashSet<>();
     }
 
     @Override
     }
 
     @Override
index 95de90d3af59f92656b9256bb4b62d7e1fb9dda9..6d151c4788bef7b5ca791c66ebbcf48f617df24f 100644 (file)
@@ -39,9 +39,9 @@ public class MockedDependenciesTest extends AbstractParallelAPSPTest {
                 mockedThreadPoolConfigFactory));
     }
 
                 mockedThreadPoolConfigFactory));
     }
 
-    public static interface MockedTestingThreadPoolConfigMXBean extends
+    public interface MockedTestingThreadPoolConfigMXBean extends
             TestingThreadPoolConfigMXBean {
             TestingThreadPoolConfigMXBean {
-        public void setThreadCount(int threadCount);
+        void setThreadCount(int threadCount);
     }
 
     public static class MockedThreadPoolModule implements Module,
     }
 
     public static class MockedThreadPoolModule implements Module,
index 6ccb2418f0b1d8b9f7af5dcb6b55ca92398782b7..e2610d9773ae341342b68b2156ee2f52d36a6559 100644 (file)
@@ -12,10 +12,10 @@ import org.opendaylight.controller.config.manager.testingservices.threadpool.Tes
 public interface TestingScheduledThreadPoolConfigBeanMXBean extends
         TestingThreadPoolConfigMXBean {
 
 public interface TestingScheduledThreadPoolConfigBeanMXBean extends
         TestingThreadPoolConfigMXBean {
 
-    public boolean isRecreate();
+    boolean isRecreate();
 
 
-    public void setRecreate(boolean recreate);
+    void setRecreate(boolean recreate);
 
 
-    public void setThreadCount(int threadCount);
+    void setThreadCount(int threadCount);
 
 }
 
 }
index d34e73ec4723d8d1fa151b0dfe8f161ec6716b33..295d348503869899cc3a844beded7633042f4f75 100644 (file)
@@ -67,7 +67,7 @@ public class TestingScheduledThreadPoolModuleFactory implements ModuleFactory {
 
     @Override
     public Set<Module> getDefaultModules(final DependencyResolverFactory dependencyResolverFactory, final BundleContext bundleContext) {
 
     @Override
     public Set<Module> getDefaultModules(final DependencyResolverFactory dependencyResolverFactory, final BundleContext bundleContext) {
-        return new HashSet<Module>();
+        return new HashSet<>();
     }
 
     @Override
     }
 
     @Override
index 0a886e5fb0490a663df6429a045d9d23fb2690f0..2d99b25e0af5c5383f6b4cede90753100d406355 100644 (file)
@@ -15,5 +15,5 @@ import org.opendaylight.controller.config.manager.testingservices.threadpool.Tes
     namespace = "ns", revision = "foo", localName = "testing-threadpool")
 public interface TestingThreadPoolServiceInterface extends
         AbstractServiceInterface {
     namespace = "ns", revision = "foo", localName = "testing-threadpool")
 public interface TestingThreadPoolServiceInterface extends
         AbstractServiceInterface {
-    public static final String QNAME = "(ns?revision=foo)testing-threadpool";
+    String QNAME = "(ns?revision=foo)testing-threadpool";
 }
 }
index 115eb83b7f7f48643194361f87723b52d6518075..34f24c68025cf86cadc46a7473b2b52c26c86690 100644 (file)
@@ -10,10 +10,10 @@ package org.opendaylight.controller.config.manager.testingservices.threadpool;
 public interface TestingFixedThreadPoolConfigMXBean extends
         TestingThreadPoolConfigMXBean {
 
 public interface TestingFixedThreadPoolConfigMXBean extends
         TestingThreadPoolConfigMXBean {
 
-    public void setThreadCount(int threadCount);
+    void setThreadCount(int threadCount);
 
 
-    public boolean isTriggerNewInstanceCreation();
+    boolean isTriggerNewInstanceCreation();
 
 
-    public void setTriggerNewInstanceCreation(boolean boolTest);
+    void setTriggerNewInstanceCreation(boolean boolTest);
 
 }
 
 }
index d385a7db5a2d007bb6d4320f31d7247a4ecde1c1..2fef47eb10ed8d7b7225aeb9ace224642b7e4cd6 100644 (file)
@@ -69,7 +69,7 @@ public class TestingFixedThreadPoolModuleFactory extends AbstractTestingFixedThr
 
     @Override
     public Set<Module> getDefaultModules(final DependencyResolverFactory dependencyResolverFactory, final BundleContext bundleContext) {
 
     @Override
     public Set<Module> getDefaultModules(final DependencyResolverFactory dependencyResolverFactory, final BundleContext bundleContext) {
-        return new HashSet<Module>();
+        return new HashSet<>();
     }
 
     @Override
     }
 
     @Override
index 792a66676fbd372e7ca1fbb5d1b31653bd6d1ea8..b537ad2080f5949d66617fb63cf3d6fddb686b1b 100644 (file)
@@ -9,5 +9,5 @@ package org.opendaylight.controller.config.manager.testingservices.threadpool;
 
 public interface TestingThreadPoolConfigMXBean {
 
 
 public interface TestingThreadPoolConfigMXBean {
 
-    public int getThreadCount();
+    int getThreadCount();
 }
 }
index 2dade8a82b9aaa7b24748eca771cf08c071591c6..106ab6b9f6a867e740498ae1e1e61ab3c1f67854 100644 (file)
@@ -17,5 +17,5 @@ public interface ConfigPusher {
      * Pushes configs into the config subsystem
      */
 
      * Pushes configs into the config subsystem
      */
 
-    public void pushConfigs(List<? extends ConfigSnapshotHolder> configs) throws InterruptedException;
+    void pushConfigs(List<? extends ConfigSnapshotHolder> configs) throws InterruptedException;
 }
 }
index ea99579f16468b070cef861765dc1dbf509cc21c..0b4f6f778133a040f6a507fe6d89eb89b6b26bd5 100644 (file)
@@ -22,7 +22,7 @@ public class ConfigPusherFeatureActivator implements BundleActivator {
     public void start(BundleContext context) throws Exception {
         bc = context;
         cpc = new ConfigPusherCustomizer();
     public void start(BundleContext context) throws Exception {
         bc = context;
         cpc = new ConfigPusherCustomizer();
-        cpst = new ServiceTracker<ConfigPusher, ConfigPusher>(bc, ConfigPusher.class.getName(), cpc);
+        cpst = new ServiceTracker<>(bc, ConfigPusher.class.getName(), cpc);
         cpst.open();
     }
 
         cpst.open();
     }
 
index 7da9b9f9a3663482c989e44cb9a8bab8da04c886..672784a54b3fc520a7c3613c90037a2235dcac87 100644 (file)
@@ -54,7 +54,7 @@ public class ChildAwareFeatureWrapper extends AbstractFeatureWrapper implements
      */
     public LinkedHashSet <? extends ChildAwareFeatureWrapper> getChildFeatures() throws Exception {
         List<Dependency> dependencies = feature.getDependencies();
      */
     public LinkedHashSet <? extends ChildAwareFeatureWrapper> getChildFeatures() throws Exception {
         List<Dependency> dependencies = feature.getDependencies();
-        LinkedHashSet <ChildAwareFeatureWrapper> childFeatures = new LinkedHashSet<ChildAwareFeatureWrapper>();
+        LinkedHashSet <ChildAwareFeatureWrapper> childFeatures = new LinkedHashSet<>();
         if(dependencies != null) {
             for(Dependency dependency: dependencies) {
                 Feature fi = extractFeatureFromDependency(dependency);
         if(dependencies != null) {
             for(Dependency dependency: dependencies) {
                 Feature fi = extractFeatureFromDependency(dependency);
@@ -73,7 +73,7 @@ public class ChildAwareFeatureWrapper extends AbstractFeatureWrapper implements
 
     @Override
     public LinkedHashSet<FeatureConfigSnapshotHolder> getFeatureConfigSnapshotHolders() throws Exception {
 
     @Override
     public LinkedHashSet<FeatureConfigSnapshotHolder> getFeatureConfigSnapshotHolders() throws Exception {
-        LinkedHashSet <FeatureConfigSnapshotHolder> snapShotHolders = new LinkedHashSet<FeatureConfigSnapshotHolder>();
+        LinkedHashSet <FeatureConfigSnapshotHolder> snapShotHolders = new LinkedHashSet<>();
         for(ChildAwareFeatureWrapper c: getChildFeatures()) {
             for(FeatureConfigSnapshotHolder h: c.getFeatureConfigSnapshotHolders()) {
                 final Optional<FeatureConfigSnapshotHolder> featureConfigSnapshotHolder = getFeatureConfigSnapshotHolder(h.getFileInfo());
         for(ChildAwareFeatureWrapper c: getChildFeatures()) {
             for(FeatureConfigSnapshotHolder h: c.getFeatureConfigSnapshotHolders()) {
                 final Optional<FeatureConfigSnapshotHolder> featureConfigSnapshotHolder = getFeatureConfigSnapshotHolder(h.getFileInfo());
index 72abca1c9911caf4ffbbcc8cbf9939a0eb818daf..3297ba4939a25030667a8f5d130eb8202243e7d6 100644 (file)
@@ -20,7 +20,7 @@ import org.slf4j.LoggerFactory;
 public class ConfigFeaturesListener implements  FeaturesListener,  AutoCloseable {
     private static final Logger LOG = LoggerFactory.getLogger(ConfigFeaturesListener.class);
     private static final int QUEUE_SIZE = 1000;
 public class ConfigFeaturesListener implements  FeaturesListener,  AutoCloseable {
     private static final Logger LOG = LoggerFactory.getLogger(ConfigFeaturesListener.class);
     private static final int QUEUE_SIZE = 1000;
-    private BlockingQueue<FeatureEvent> queue = new LinkedBlockingQueue<FeatureEvent>(QUEUE_SIZE);
+    private BlockingQueue<FeatureEvent> queue = new LinkedBlockingQueue<>(QUEUE_SIZE);
     Thread pushingThread = null;
 
     public ConfigFeaturesListener(ConfigPusher p, FeaturesService f) {
     Thread pushingThread = null;
 
     public ConfigFeaturesListener(ConfigPusher p, FeaturesService f) {
index 52bca765553420113c1db83efa1946351c4c9e04..420e8d7a35406bf455458b5b5eb98688b70c3b0c 100644 (file)
@@ -28,7 +28,7 @@ public class ConfigPusherCustomizer implements ServiceTrackerCustomizer<ConfigPu
         BundleContext bc = configPusherServiceReference.getBundle().getBundleContext();
         ConfigPusher cpService = bc.getService(configPusherServiceReference);
         featureServiceCustomizer = new FeatureServiceCustomizer(cpService);
         BundleContext bc = configPusherServiceReference.getBundle().getBundleContext();
         ConfigPusher cpService = bc.getService(configPusherServiceReference);
         featureServiceCustomizer = new FeatureServiceCustomizer(cpService);
-        fsst = new ServiceTracker<FeaturesService, FeaturesService>(bc, FeaturesService.class.getName(), featureServiceCustomizer);
+        fsst = new ServiceTracker<>(bc, FeaturesService.class.getName(), featureServiceCustomizer);
         fsst.open();
         return cpService;
     }
         fsst.open();
         return cpService;
     }
index a32a0ac28fe5591435b2444a7a6d73589b5f287e..e94d6155c9b60bef56337ecf32e66981e86c5154 100644 (file)
@@ -32,7 +32,7 @@ public class ConfigPushingRunnable implements Runnable {
 
     @Override
     public void run() {
 
     @Override
     public void run() {
-        List<Feature> toInstall = new ArrayList<Feature>();
+        List<Feature> toInstall = new ArrayList<>();
         FeatureEvent event = null;
         boolean interuppted = false;
         while(true) {
         FeatureEvent event = null;
         boolean interuppted = false;
         while(true) {
index 0d30545641e7778f912a5a6b89df6532ce46d151..f11da079c6da920bebf75ddc98800be2ae8de8b6 100644 (file)
@@ -36,7 +36,7 @@ public class FeatureConfigPusher {
      * chains.  Also, preserves the *original* Feature chain for which we pushed the config.
      * (which is handy for logging).
      */
      * chains.  Also, preserves the *original* Feature chain for which we pushed the config.
      * (which is handy for logging).
      */
-    LinkedHashSet<FeatureConfigSnapshotHolder> pushedConfigs = new LinkedHashSet<FeatureConfigSnapshotHolder>();
+    LinkedHashSet<FeatureConfigSnapshotHolder> pushedConfigs = new LinkedHashSet<>();
     /*
      * LinkedHashMultimap to track which configs we pushed for each Feature installation
      * For future use
     /*
      * LinkedHashMultimap to track which configs we pushed for each Feature installation
      * For future use
@@ -118,7 +118,7 @@ public class FeatureConfigPusher {
     }
 
     private LinkedHashSet<FeatureConfigSnapshotHolder> pushConfig(final LinkedHashSet<FeatureConfigSnapshotHolder> configs, final Feature feature) throws InterruptedException {
     }
 
     private LinkedHashSet<FeatureConfigSnapshotHolder> pushConfig(final LinkedHashSet<FeatureConfigSnapshotHolder> configs, final Feature feature) throws InterruptedException {
-        LinkedHashSet<FeatureConfigSnapshotHolder> configsToPush = new LinkedHashSet<FeatureConfigSnapshotHolder>(configs);
+        LinkedHashSet<FeatureConfigSnapshotHolder> configsToPush = new LinkedHashSet<>(configs);
         configsToPush.removeAll(pushedConfigs);
         if (!configsToPush.isEmpty()) {
 
         configsToPush.removeAll(pushedConfigs);
         if (!configsToPush.isEmpty()) {
 
@@ -134,7 +134,7 @@ public class FeatureConfigPusher {
 
             pushedConfigs.addAll(configsToPush);
         }
 
             pushedConfigs.addAll(configsToPush);
         }
-        LinkedHashSet<FeatureConfigSnapshotHolder> configsPushed = new LinkedHashSet<FeatureConfigSnapshotHolder>(pushedConfigs);
+        LinkedHashSet<FeatureConfigSnapshotHolder> configsPushed = new LinkedHashSet<>(pushedConfigs);
         configsPushed.retainAll(configs);
         return configsPushed;
     }
         configsPushed.retainAll(configs);
         return configsPushed;
     }
index 15c14daea576c29bc78cb01c076f97d6cd368fa9..135211727add6ad076fd56f7dcb66f3bee9c6b29 100644 (file)
@@ -40,7 +40,7 @@ import org.opendaylight.controller.config.persist.storage.file.xml.model.ConfigS
 public class FeatureConfigSnapshotHolder implements ConfigSnapshotHolder {
     private ConfigSnapshot unmarshalled = null;
     private ConfigFileInfo fileInfo = null;
 public class FeatureConfigSnapshotHolder implements ConfigSnapshotHolder {
     private ConfigSnapshot unmarshalled = null;
     private ConfigFileInfo fileInfo = null;
-    private List<Feature> featureChain = new ArrayList<Feature>();
+    private List<Feature> featureChain = new ArrayList<>();
 
     /*
      * @param holder - FeatureConfigSnapshotHolder that we
 
     /*
      * @param holder - FeatureConfigSnapshotHolder that we
index 90f71ca51aa1fc338fdae21aaacdff0a665196ca..d93bd7daf5be9e5d649ebaf35849c8e6948b9069 100644 (file)
@@ -72,7 +72,6 @@ public class ConfigPusherImpl implements ConfigPusher {
     public void process(List<AutoCloseable> autoCloseables, MBeanServerConnection platformMBeanServer,
             Persister persisterAggregator, boolean propagateExceptions) throws InterruptedException {
         while(processSingle(autoCloseables, platformMBeanServer, persisterAggregator, propagateExceptions)) {
     public void process(List<AutoCloseable> autoCloseables, MBeanServerConnection platformMBeanServer,
             Persister persisterAggregator, boolean propagateExceptions) throws InterruptedException {
         while(processSingle(autoCloseables, platformMBeanServer, persisterAggregator, propagateExceptions)) {
-            ;
         }
     }
 
         }
     }
 
index f9288abe2a647f71ce403dd3c35116f372c6ca77..28134617f0161109703ed928c1d40e1e6966fa3f 100644 (file)
@@ -18,15 +18,15 @@ import java.util.Collection;
 // TODO this should be placed into API bundle for netconf
 public interface Capability {
 
 // TODO this should be placed into API bundle for netconf
 public interface Capability {
 
-    public String getCapabilityUri();
+    String getCapabilityUri();
 
 
-    public Optional<String> getModuleNamespace();
+    Optional<String> getModuleNamespace();
 
 
-    public Optional<String> getModuleName();
+    Optional<String> getModuleName();
 
 
-    public Optional<String> getRevision();
+    Optional<String> getRevision();
 
 
-    public Optional<String> getCapabilitySchema();
+    Optional<String> getCapabilitySchema();
 
 
-    public Collection<String> getLocation();
+    Collection<String> getLocation();
 }
 }
index 73ab6dad7b06bb8099c3f8e6c5dbf297a56ea525..d3b8add96d5ac98ab7e669a22a8adb8009c716fb 100644 (file)
@@ -49,8 +49,8 @@ public class TestingConfigTransactionController implements
                 + ":type=Module," + ObjectNameUtil.MODULE_FACTORY_NAME_KEY
                 + "=" + moduleName2 + "," + ObjectNameUtil.INSTANCE_NAME_KEY
                 + "=" + instName2);
                 + ":type=Module," + ObjectNameUtil.MODULE_FACTORY_NAME_KEY
                 + "=" + moduleName2 + "," + ObjectNameUtil.INSTANCE_NAME_KEY
                 + "=" + instName2);
-        mapSub = new HashMap<String, ObjectName>();
-        map = new HashMap<String, Map<String,ObjectName>>();
+        mapSub = new HashMap<>();
+        map = new HashMap<>();
     }
 
     @Override
     }
 
     @Override
index 4c83668ab6894052af3315325224885ba4ab8ee6..8caa647cbbd1f57ed0b7b9500be8170205492914 100644 (file)
@@ -12,6 +12,6 @@ package org.opendaylight.controller.config.yang.logback.config;
  */
 public interface ContextSetter {
 
  */
 public interface ContextSetter {
 
-    public void updateContext(LogbackModule module);
+    void updateContext(LogbackModule module);
 
 }
 
 }
index 99d94d08e386b2c6df5652d017d781afb5aa08df..b77126b16d00e0d53eed8ed0d69d4fb9b1572647 100644 (file)
@@ -18,7 +18,7 @@ import java.util.concurrent.TimeUnit;
 public interface AutoCloseableEventExecutor extends EventExecutor, AutoCloseable {
 
 
 public interface AutoCloseableEventExecutor extends EventExecutor, AutoCloseable {
 
 
-    public static class CloseableEventExecutorMixin implements AutoCloseable {
+    class CloseableEventExecutorMixin implements AutoCloseable {
         public static final int DEFAULT_SHUTDOWN_SECONDS = 1;
         private final EventExecutor eventExecutor;
 
         public static final int DEFAULT_SHUTDOWN_SECONDS = 1;
         private final EventExecutor eventExecutor;
 
index fa11652850009c43ee5d579b55c33cef0575a6b6..2ae57156b412f2e19ed3040acce8fcdf2132b259 100644 (file)
@@ -74,6 +74,6 @@ public final class NettyThreadgroupModule extends org.opendaylight.controller.co
         this.bundleContext = bundleContext;
     }
 
         this.bundleContext = bundleContext;
     }
 
-    private static interface AutoCloseableEventLoopGroupInterface extends EventLoopGroup, AutoCloseable {
+    private interface AutoCloseableEventLoopGroupInterface extends EventLoopGroup, AutoCloseable {
     }
 }
     }
 }
index d1d55405a96a825ff23c44a00f4b9b10e80eec17..579806f804368411138030f33042165d568cb6ed 100644 (file)
@@ -81,6 +81,6 @@ public final class HashedWheelTimerModule extends
         this.bundleContext = bundleContext;
     }
 
         this.bundleContext = bundleContext;
     }
 
-    private static interface AutoCloseableTimerInterface extends Timer, AutoCloseable {
+    private interface AutoCloseableTimerInterface extends Timer, AutoCloseable {
     }
 }
     }
 }
index bf6c016d35d14b8b604878146da1a3cae92ad964..79ed26b2d2a9f131150dd847ca2f3a62ffcded7f 100644 (file)
@@ -16,5 +16,5 @@ import java.util.concurrent.ScheduledExecutorService;
 public interface ScheduledThreadPool extends ThreadPool {
 
     @Override
 public interface ScheduledThreadPool extends ThreadPool {
 
     @Override
-    public ScheduledExecutorService getExecutor();
+    ScheduledExecutorService getExecutor();
 }
\ No newline at end of file
 }
\ No newline at end of file
index 701b0bcdf8c5e949d042c1ec0bfa519c3f7d00dc..68ecb80fe3645ff84d12e5ce2f1ffd4372f43e6e 100644 (file)
@@ -15,7 +15,7 @@ import java.util.concurrent.ExecutorService;
  */
 public interface ThreadPool {
 
  */
 public interface ThreadPool {
 
-    public ExecutorService getExecutor();
+    ExecutorService getExecutor();
 
 
-    public int getMaxThreadCount();
+    int getMaxThreadCount();
 }
\ No newline at end of file
 }
\ No newline at end of file
index d013a0a4b807a52c5dfcf2089e559c5a4b3b0067..f416ed665c4c2daf7c8f4afa1af248f9a11b9f38 100644 (file)
@@ -54,7 +54,7 @@ public class FlexibleThreadPoolWrapper implements ThreadPool, Closeable {
      * This impl saturates threadpool first, then queue. When both are full caller will get blocked.
      */
     private static ForwardingBlockingQueue getQueue(Optional<Integer> capacity) {
      * This impl saturates threadpool first, then queue. When both are full caller will get blocked.
      */
     private static ForwardingBlockingQueue getQueue(Optional<Integer> capacity) {
-        final BlockingQueue<Runnable> delegate = capacity.isPresent() ? new LinkedBlockingQueue<Runnable>(capacity.get()) : new LinkedBlockingQueue<Runnable>();
+        final BlockingQueue<Runnable> delegate = capacity.isPresent() ? new LinkedBlockingQueue<>(capacity.get()) : new LinkedBlockingQueue<>();
         return new ForwardingBlockingQueue(delegate);
     }
 
         return new ForwardingBlockingQueue(delegate);
     }
 
index ed4437df0eaa9584fcc536884eef8fbab611af52..e7f1025c4d28491f7b75fb87ff863fc183d7e625 100644 (file)
@@ -54,7 +54,7 @@ public class ModuleMXBeanEntryNameConflictTest extends AbstractYangTest {
             try {
                 LOG.debug("Testing {}", yangFile);
                 ModuleMXBeanEntry.create(testedModule,
             try {
                 LOG.debug("Testing {}", yangFile);
                 ModuleMXBeanEntry.create(testedModule,
-                        new HashMap<QName, ServiceInterfaceEntry>(), context,
+                        new HashMap<>(), context,
                         new TypeProviderWrapper(new TypeProviderImpl(context)),
                         PACKAGE_NAME);
                 fail(yangFile.toString()
                         new TypeProviderWrapper(new TypeProviderImpl(context)),
                         PACKAGE_NAME);
                 fail(yangFile.toString()
index 50f38e3978a790528205fb58452c4956a646e659..06819737abff3dafe5f252efafef74ea58e9333b 100644 (file)
@@ -273,18 +273,18 @@ public class ModuleMXBeanEntryTest extends AbstractYangTest {
                 assertThat(toAttr.getLowerCaseCammelCase(), is("peer"));
                 assertThat(toAttr.getUpperCaseCammelCase(), is("Peer"));
                 assertThat(toAttr.getOpenType(), isA(CompositeType.class));
                 assertThat(toAttr.getLowerCaseCammelCase(), is("peer"));
                 assertThat(toAttr.getUpperCaseCammelCase(), is("Peer"));
                 assertThat(toAttr.getOpenType(), isA(CompositeType.class));
-                Set<String> propsExpected = new HashSet<String>(2);
+                Set<String> propsExpected = new HashSet<>(2);
                 propsExpected.add("port");
                 propsExpected.add("core-size");
                 assertThat(toAttr.getYangPropertiesToTypesMap().keySet(),
                         is(propsExpected));
                 propsExpected.add("port");
                 propsExpected.add("core-size");
                 assertThat(toAttr.getYangPropertiesToTypesMap().keySet(),
                         is(propsExpected));
-                propsExpected = new HashSet<String>(2);
+                propsExpected = new HashSet<>(2);
                 propsExpected.add("Port");
                 propsExpected.add("CoreSize");
                 assertThat(
                         toAttr.getCapitalizedPropertiesToTypesMap().keySet(),
                         is(propsExpected));
                 propsExpected.add("Port");
                 propsExpected.add("CoreSize");
                 assertThat(
                         toAttr.getCapitalizedPropertiesToTypesMap().keySet(),
                         is(propsExpected));
-                propsExpected = new HashSet<String>(2);
+                propsExpected = new HashSet<>(2);
                 propsExpected.add("port");
                 propsExpected.add("coreSize");
                 assertThat(toAttr.getJmxPropertiesToTypesMap().keySet(),
                 propsExpected.add("port");
                 propsExpected.add("coreSize");
                 assertThat(toAttr.getJmxPropertiesToTypesMap().keySet(),
index 98b1f752afbbe669a8dd01448b6609b751b1f461..dcb9089bb8c6d02555f755535b9589578456f1ae 100644 (file)
@@ -103,7 +103,7 @@ public class RuntimeBeanEntryTest extends AbstractYangTest {
         assertEquals(THREAD_RUNTIME_BEAN_YANG_NAME, runtimeBeanEntry.getYangName());
 
         // get thread runtime bean rpcs
         assertEquals(THREAD_RUNTIME_BEAN_YANG_NAME, runtimeBeanEntry.getYangName());
 
         // get thread runtime bean rpcs
-        List<RuntimeBeanEntry.Rpc> rpcs = new ArrayList<RuntimeBeanEntry.Rpc>(
+        List<RuntimeBeanEntry.Rpc> rpcs = new ArrayList<>(
                 runtimeBeanEntry.getRpcs());
         assertEquals(2, rpcs.size());
 
                 runtimeBeanEntry.getRpcs());
         assertEquals(2, rpcs.size());