config-util: final parameters 60/56960/2
authorStephen Kitt <skitt@redhat.com>
Fri, 12 May 2017 15:17:31 +0000 (17:17 +0200)
committerTom Pantelis <tompantelis@gmail.com>
Mon, 15 May 2017 11:54:18 +0000 (11:54 +0000)
This automatically-generated patch flags all appropriate parameters as
final (including caught exceptions).

Change-Id: Ic60c96d83aa19cd7e5adeaf9a7422d26713b326f
Signed-off-by: Stephen Kitt <skitt@redhat.com>
opendaylight/config/config-util/src/main/java/org/opendaylight/controller/config/util/AttributeEntry.java
opendaylight/config/config-util/src/main/java/org/opendaylight/controller/config/util/CloseableUtil.java
opendaylight/config/config-util/src/main/java/org/opendaylight/controller/config/util/ConfigRegistryJMXClient.java
opendaylight/config/config-util/src/main/java/org/opendaylight/controller/config/util/ConfigTransactionJMXClient.java
opendaylight/config/config-util/src/main/java/org/opendaylight/controller/config/util/xml/DocumentedException.java
opendaylight/config/config-util/src/main/java/org/opendaylight/controller/config/util/xml/XmlElement.java
opendaylight/config/config-util/src/main/java/org/opendaylight/controller/config/util/xml/XmlUtil.java
opendaylight/config/config-util/src/test/java/org/opendaylight/controller/config/util/ConfigTransactionClientsTest.java
opendaylight/config/config-util/src/test/java/org/opendaylight/controller/config/util/LookupTest.java
opendaylight/config/config-util/src/test/java/org/opendaylight/controller/config/util/TestingConfigRegistry.java
opendaylight/config/config-util/src/test/java/org/opendaylight/controller/config/util/TestingConfigTransactionController.java

index c3299ac34a52f6459e6959e2f6b4647c431316d6..47c41290cc7cfa6f0968c1a5038ab92e63c88cd9 100644 (file)
@@ -14,8 +14,8 @@ public class AttributeEntry {
     private final String type;
     private final boolean rw;
 
-    public AttributeEntry(String key, String description, Object value,
-            String type, boolean rw) {
+    public AttributeEntry(final String key, final String description, final Object value,
+            final String type, final boolean rw) {
         this.key = key;
         this.description = description;
         this.value = value;
index b5f5752dcefcf834e606bb33554746fa220ca361..5803da0ab2036aa175a18b2f5043cac0ae9f7250 100644 (file)
@@ -13,12 +13,12 @@ public class CloseableUtil {
     private CloseableUtil() {
     }
 
-    public static void closeAll(Iterable<? extends AutoCloseable> autoCloseables) throws Exception {
+    public static void closeAll(final Iterable<? extends AutoCloseable> autoCloseables) throws Exception {
         Exception lastException = null;
         for (AutoCloseable autoCloseable : autoCloseables) {
             try {
                 autoCloseable.close();
-            } catch (Exception e) {
+            } catch (final Exception e) {
                 if (lastException == null) {
                     lastException = e;
                 } else {
index 71adea8a2f1198dbc0ee7669795a3af4bed463c3..395e0837c2eabf826a18980f103fa0cc7e375db8 100644 (file)
@@ -33,11 +33,11 @@ public class ConfigRegistryJMXClient implements ConfigRegistryClient {
     private final ObjectName configRegistryON;
     private final MBeanServer configMBeanServer;
 
-    public ConfigRegistryJMXClient(MBeanServer configMBeanServer) {
+    public ConfigRegistryJMXClient(final MBeanServer configMBeanServer) {
         this(configMBeanServer, OBJECT_NAME);
     }
 
-    private ConfigRegistryJMXClient(MBeanServer configMBeanServer, ObjectName configRegistryON) {
+    private ConfigRegistryJMXClient(final MBeanServer configMBeanServer, final ObjectName configRegistryON) {
         this.configMBeanServer = configMBeanServer;
         this.configRegistryON = configRegistryON;
         Set<ObjectInstance> searchResult = configMBeanServer.queryMBeans(configRegistryON, null);
@@ -48,7 +48,7 @@ public class ConfigRegistryJMXClient implements ConfigRegistryClient {
                 false);
     }
 
-    public static ConfigRegistryJMXClient createWithoutNotifications(MBeanServer configMBeanServer) {
+    public static ConfigRegistryJMXClient createWithoutNotifications(final MBeanServer configMBeanServer) {
         return new ConfigRegistryJMXClient(configMBeanServer, ConfigRegistryConstants.OBJECT_NAME_NO_NOTIFICATIONS);
     }
 
@@ -60,7 +60,7 @@ public class ConfigRegistryJMXClient implements ConfigRegistryClient {
 
     @Override
     public ConfigTransactionJMXClient getConfigTransactionClient(
-            String transactionName) {
+            final String transactionName) {
         ObjectName objectName = ObjectNameUtil
                 .createTransactionControllerON(transactionName);
         return getConfigTransactionClient(objectName);
@@ -68,7 +68,7 @@ public class ConfigRegistryJMXClient implements ConfigRegistryClient {
 
     @Override
     public ConfigTransactionJMXClient getConfigTransactionClient(
-            ObjectName objectName) {
+            final ObjectName objectName) {
         return new ConfigTransactionJMXClient(configRegistryMXBeanProxy, objectName,
                 configMBeanServer);
     }
@@ -80,12 +80,12 @@ public class ConfigRegistryJMXClient implements ConfigRegistryClient {
      * This method will be removed soon.
      */
     @Deprecated
-    public <T> T newMBeanProxy(ObjectName on, Class<T> clazz) {
+    public <T> T newMBeanProxy(final ObjectName on, final Class<T> clazz) {
         ObjectName onObj = translateServiceRefIfPossible(on, clazz, configMBeanServer);
         return JMX.newMBeanProxy(configMBeanServer, onObj, clazz);
     }
 
-    static  ObjectName translateServiceRefIfPossible(ObjectName on, Class<?> clazz, MBeanServer configMBeanServer) {
+    static  ObjectName translateServiceRefIfPossible(final ObjectName on, final Class<?> clazz, final MBeanServer configMBeanServer) {
         ObjectName onObj = on;
         if (ObjectNameUtil.isServiceReference(onObj) && !clazz.equals(ServiceReferenceMXBean.class)) {
             ServiceReferenceMXBean proxy = JMX.newMXBeanProxy(configMBeanServer, onObj, ServiceReferenceMXBean.class);
@@ -95,7 +95,7 @@ public class ConfigRegistryJMXClient implements ConfigRegistryClient {
     }
 
 
-    public <T> T newMXBeanProxy(ObjectName on, Class<T> clazz) {
+    public <T> T newMXBeanProxy(final ObjectName on, final Class<T> clazz) {
         return JMX.newMXBeanProxy(configMBeanServer, on, clazz);
     }
 
@@ -105,7 +105,7 @@ public class ConfigRegistryJMXClient implements ConfigRegistryClient {
     }
 
     @Override
-    public CommitStatus commitConfig(ObjectName transactionControllerON)
+    public CommitStatus commitConfig(final ObjectName transactionControllerON)
             throws ConflictingVersionException, ValidationException {
         return configRegistryMXBeanProxy.commitConfig(transactionControllerON);
     }
@@ -120,7 +120,7 @@ public class ConfigRegistryJMXClient implements ConfigRegistryClient {
         try {
             return (Long) configMBeanServer.getAttribute(configRegistryON,
                     "Version");
-        } catch (JMException e) {
+        } catch (final JMException e) {
             throw new RuntimeException(e);
         }
     }
@@ -141,18 +141,18 @@ public class ConfigRegistryJMXClient implements ConfigRegistryClient {
     }
 
     @Override
-    public Set<ObjectName> lookupConfigBeans(String moduleName) {
+    public Set<ObjectName> lookupConfigBeans(final String moduleName) {
         return configRegistryMXBeanProxy.lookupConfigBeans(moduleName);
     }
 
     @Override
-    public Set<ObjectName> lookupConfigBeans(String moduleName,
-            String instanceName) {
+    public Set<ObjectName> lookupConfigBeans(final String moduleName,
+            final String instanceName) {
         return configRegistryMXBeanProxy.lookupConfigBeans(moduleName, instanceName);
     }
 
     @Override
-    public ObjectName lookupConfigBean(String moduleName, String instanceName)
+    public ObjectName lookupConfigBean(final String moduleName, final String instanceName)
             throws InstanceNotFoundException {
         return configRegistryMXBeanProxy.lookupConfigBean(moduleName, instanceName);
     }
@@ -163,18 +163,18 @@ public class ConfigRegistryJMXClient implements ConfigRegistryClient {
     }
 
     @Override
-    public Set<ObjectName> lookupRuntimeBeans(String ifcName,
-            String instanceName) {
+    public Set<ObjectName> lookupRuntimeBeans(final String ifcName,
+            final String instanceName) {
         return configRegistryMXBeanProxy.lookupRuntimeBeans(ifcName, instanceName);
     }
 
     @Override
-    public void checkConfigBeanExists(ObjectName objectName) throws InstanceNotFoundException {
+    public void checkConfigBeanExists(final ObjectName objectName) throws InstanceNotFoundException {
         configRegistryMXBeanProxy.checkConfigBeanExists(objectName);
     }
 
     @Override
-    public ObjectName lookupConfigBeanByServiceInterfaceName(String serviceInterfaceQName, String refName) {
+    public ObjectName lookupConfigBeanByServiceInterfaceName(final String serviceInterfaceQName, final String refName) {
         return configRegistryMXBeanProxy.lookupConfigBeanByServiceInterfaceName(serviceInterfaceQName, refName);
     }
 
@@ -184,23 +184,23 @@ public class ConfigRegistryJMXClient implements ConfigRegistryClient {
     }
 
     @Override
-    public Map<String, ObjectName> lookupServiceReferencesByServiceInterfaceName(String serviceInterfaceQName) {
+    public Map<String, ObjectName> lookupServiceReferencesByServiceInterfaceName(final String serviceInterfaceQName) {
         return configRegistryMXBeanProxy.lookupServiceReferencesByServiceInterfaceName(serviceInterfaceQName);
     }
 
     @Override
-    public Set<String> lookupServiceInterfaceNames(ObjectName objectName) throws InstanceNotFoundException {
+    public Set<String> lookupServiceInterfaceNames(final ObjectName objectName) throws InstanceNotFoundException {
         return configRegistryMXBeanProxy.lookupServiceInterfaceNames(objectName);
     }
 
     @Override
-    public String getServiceInterfaceName(String namespace, String localName) {
+    public String getServiceInterfaceName(final String namespace, final String localName) {
         return configRegistryMXBeanProxy.getServiceInterfaceName(namespace, localName);
     }
 
     @Override
-    public Object invokeMethod(ObjectName on, String name, Object[] params,
-            String[] signature) {
+    public Object invokeMethod(final ObjectName on, final String name, final Object[] params,
+            final String[] signature) {
         try {
             return configMBeanServer.invoke(on, name, params, signature);
         } catch (InstanceNotFoundException | ReflectionException
@@ -213,7 +213,7 @@ public class ConfigRegistryJMXClient implements ConfigRegistryClient {
     }
 
     @Override
-    public Object getAttributeCurrentValue(ObjectName on, String attributeName) {
+    public Object getAttributeCurrentValue(final ObjectName on, final String attributeName) {
         try {
             return configMBeanServer.getAttribute(on, attributeName);
         } catch (AttributeNotFoundException | InstanceNotFoundException
@@ -229,12 +229,12 @@ public class ConfigRegistryJMXClient implements ConfigRegistryClient {
     }
 
     @Override
-    public ObjectName getServiceReference(String serviceInterfaceQName, String refName) throws InstanceNotFoundException {
+    public ObjectName getServiceReference(final String serviceInterfaceQName, final String refName) throws InstanceNotFoundException {
         return configRegistryMXBeanProxy.getServiceReference(serviceInterfaceQName, refName);
     }
 
     @Override
-    public void checkServiceReferenceExists(ObjectName objectName) throws InstanceNotFoundException {
+    public void checkServiceReferenceExists(final ObjectName objectName) throws InstanceNotFoundException {
         configRegistryMXBeanProxy.checkServiceReferenceExists(objectName);
     }
 }
index d49c37ddd80914248c7894c58e7bdc5895c28aec..f13592364609c3e5a0faf0b2d32f03853adbaa0d 100644 (file)
@@ -31,9 +31,9 @@ public class ConfigTransactionJMXClient implements ConfigTransactionClient {
     private final MBeanServer configMBeanServer;
 
     public ConfigTransactionJMXClient(
-            ConfigRegistryMXBean configRegistryMXBeanProxy,
-            ObjectName configTransactionControllerON,
-            MBeanServer configMBeanServer) {
+            final ConfigRegistryMXBean configRegistryMXBeanProxy,
+            final ObjectName configTransactionControllerON,
+            final MBeanServer configMBeanServer) {
         this.configMBeanServer = configMBeanServer;
         this.configRegistryMXBeanProxy = configRegistryMXBeanProxy;
         this.configTransactionControllerON = configTransactionControllerON;
@@ -42,7 +42,7 @@ public class ConfigTransactionJMXClient implements ConfigTransactionClient {
                 ConfigTransactionControllerMXBean.class);
     }
 
-    public <T> T newMXBeanProxy(ObjectName on, Class<T> clazz) {
+    public <T> T newMXBeanProxy(final ObjectName on, final Class<T> clazz) {
         ObjectName onName = on;
         // if on is without transaction, add it. Reason is that when using getters on MXBeans the transaction name is stripped
         onName = ObjectNameUtil.withTransactionName(onName, getTransactionName());
@@ -59,7 +59,7 @@ public class ConfigTransactionJMXClient implements ConfigTransactionClient {
      * This method will be removed soon.
      */
     @Deprecated
-    public <T> T newMBeanProxy(ObjectName on, Class<T> clazz) {
+    public <T> T newMBeanProxy(final ObjectName on, final Class<T> clazz) {
         return JMX.newMBeanProxy(configMBeanServer, on, clazz);
     }
 
@@ -71,8 +71,8 @@ public class ConfigTransactionJMXClient implements ConfigTransactionClient {
     }
 
     @Override
-    public void assertVersion(int expectedParentVersion,
-            int expectedCurrentVersion) {
+    public void assertVersion(final int expectedParentVersion,
+            final int expectedCurrentVersion) {
         if (expectedParentVersion != getParentVersion()) {
             throw new IllegalStateException();
         }
@@ -83,18 +83,18 @@ public class ConfigTransactionJMXClient implements ConfigTransactionClient {
 
     // proxy around ConfigManagerMXBean
     @Override
-    public ObjectName createModule(String moduleName, String instanceName)
+    public ObjectName createModule(final String moduleName, final String instanceName)
             throws InstanceAlreadyExistsException {
         return configTransactionControllerMXBeanProxy.createModule(moduleName, instanceName);
     }
 
     @Override
-    public void reCreateModule(ObjectName objectName) throws InstanceNotFoundException {
+    public void reCreateModule(final ObjectName objectName) throws InstanceNotFoundException {
         configTransactionControllerMXBeanProxy.reCreateModule(objectName);
     }
 
     @Override
-    public void destroyModule(ObjectName objectName)
+    public void destroyModule(final ObjectName objectName)
             throws InstanceNotFoundException {
         configTransactionControllerMXBeanProxy.destroyModule(objectName);
     }
@@ -104,14 +104,14 @@ public class ConfigTransactionJMXClient implements ConfigTransactionClient {
     /**
      * {@inheritDoc}
      */
-    public void destroyConfigBean(String moduleName, String instanceName)
+    public void destroyConfigBean(final String moduleName, final String instanceName)
             throws InstanceNotFoundException {
         destroyModule(ObjectNameUtil.createTransactionModuleON(
                 getTransactionName(), moduleName, instanceName));
     }
 
     @Override
-    public void destroyModule(String moduleName, String instanceName)
+    public void destroyModule(final String moduleName, final String instanceName)
             throws InstanceNotFoundException {
         destroyModule(ObjectNameUtil.createTransactionModuleON(
                 getTransactionName(), moduleName, instanceName));
@@ -132,7 +132,7 @@ public class ConfigTransactionJMXClient implements ConfigTransactionClient {
         try {
             return (Long) configMBeanServer.getAttribute(
                     configTransactionControllerON, "ParentVersion");
-        } catch (JMException e) {
+        } catch (final JMException e) {
             throw new RuntimeException(e);
         }
     }
@@ -142,7 +142,7 @@ public class ConfigTransactionJMXClient implements ConfigTransactionClient {
         try {
             return (Long) configMBeanServer.getAttribute(
                     configTransactionControllerON, "Version");
-        } catch (JMException e) {
+        } catch (final JMException e) {
             throw new RuntimeException(e);
         }
     }
@@ -168,35 +168,35 @@ public class ConfigTransactionJMXClient implements ConfigTransactionClient {
     }
 
     @Override
-    public Set<ObjectName> lookupConfigBeans(String moduleName) {
+    public Set<ObjectName> lookupConfigBeans(final String moduleName) {
         return configTransactionControllerMXBeanProxy.lookupConfigBeans(moduleName);
     }
 
     @Override
-    public ObjectName lookupConfigBean(String moduleName, String instanceName)
+    public ObjectName lookupConfigBean(final String moduleName, final String instanceName)
             throws InstanceNotFoundException {
         return configTransactionControllerMXBeanProxy.lookupConfigBean(moduleName, instanceName);
     }
 
     @Override
-    public Set<ObjectName> lookupConfigBeans(String moduleName,
-            String instanceName) {
+    public Set<ObjectName> lookupConfigBeans(final String moduleName,
+            final String instanceName) {
         return configTransactionControllerMXBeanProxy
                 .lookupConfigBeans(moduleName, instanceName);
     }
 
     @Override
-    public void checkConfigBeanExists(ObjectName objectName) throws InstanceNotFoundException {
+    public void checkConfigBeanExists(final ObjectName objectName) throws InstanceNotFoundException {
         configTransactionControllerMXBeanProxy.checkConfigBeanExists(objectName);
     }
 
     @Override
-    public ObjectName saveServiceReference(String serviceInterfaceName, String refName, ObjectName moduleON) throws InstanceNotFoundException {
+    public ObjectName saveServiceReference(final String serviceInterfaceName, final String refName, final ObjectName moduleON) throws InstanceNotFoundException {
         return configTransactionControllerMXBeanProxy.saveServiceReference(serviceInterfaceName,refName, moduleON);
     }
 
     @Override
-    public void removeServiceReference(String serviceInterfaceName, String refName) throws InstanceNotFoundException{
+    public void removeServiceReference(final String serviceInterfaceName, final String refName) throws InstanceNotFoundException{
         configTransactionControllerMXBeanProxy.removeServiceReference(serviceInterfaceName, refName);
     }
 
@@ -206,7 +206,7 @@ public class ConfigTransactionJMXClient implements ConfigTransactionClient {
     }
 
     @Override
-    public ObjectName lookupConfigBeanByServiceInterfaceName(String serviceInterfaceQName, String refName) {
+    public ObjectName lookupConfigBeanByServiceInterfaceName(final String serviceInterfaceQName, final String refName) {
         return configTransactionControllerMXBeanProxy.lookupConfigBeanByServiceInterfaceName(serviceInterfaceQName, refName);
     }
 
@@ -216,37 +216,37 @@ public class ConfigTransactionJMXClient implements ConfigTransactionClient {
     }
 
     @Override
-    public Map<String, ObjectName> lookupServiceReferencesByServiceInterfaceName(String serviceInterfaceQName) {
+    public Map<String, ObjectName> lookupServiceReferencesByServiceInterfaceName(final String serviceInterfaceQName) {
         return configTransactionControllerMXBeanProxy.lookupServiceReferencesByServiceInterfaceName(serviceInterfaceQName);
     }
 
     @Override
-    public Set<String> lookupServiceInterfaceNames(ObjectName objectName) throws InstanceNotFoundException {
+    public Set<String> lookupServiceInterfaceNames(final ObjectName objectName) throws InstanceNotFoundException {
         return configTransactionControllerMXBeanProxy.lookupServiceInterfaceNames(objectName);
     }
 
     @Override
-    public String getServiceInterfaceName(String namespace, String localName) {
+    public String getServiceInterfaceName(final String namespace, final String localName) {
         return configTransactionControllerMXBeanProxy.getServiceInterfaceName(namespace, localName);
     }
 
     @Override
-    public boolean removeServiceReferences(ObjectName objectName) throws InstanceNotFoundException {
+    public boolean removeServiceReferences(final ObjectName objectName) throws InstanceNotFoundException {
         return configTransactionControllerMXBeanProxy.removeServiceReferences(objectName);
     }
 
     @Override
-    public ObjectName getServiceReference(String serviceInterfaceQName, String refName) throws InstanceNotFoundException {
+    public ObjectName getServiceReference(final String serviceInterfaceQName, final String refName) throws InstanceNotFoundException {
         return configTransactionControllerMXBeanProxy.getServiceReference(serviceInterfaceQName, refName);
     }
 
     @Override
-    public void checkServiceReferenceExists(ObjectName objectName) throws InstanceNotFoundException {
+    public void checkServiceReferenceExists(final ObjectName objectName) throws InstanceNotFoundException {
         configTransactionControllerMXBeanProxy.checkServiceReferenceExists(objectName);
     }
 
     @Override
-    public Attribute getAttribute(ObjectName on, String attrName) {
+    public Attribute getAttribute(final ObjectName on, final String attrName) {
         if (ObjectNameUtil.getTransactionName(on) == null) {
             throw new IllegalArgumentException("Not in transaction instance "
                     + on + ", no transaction name present");
@@ -254,36 +254,36 @@ public class ConfigTransactionJMXClient implements ConfigTransactionClient {
 
         try {
             return new Attribute(attrName, configMBeanServer.getAttribute(on,attrName));
-        } catch (JMException e) {
+        } catch (final JMException e) {
             throw new IllegalStateException("Unable to get attribute "
                     + attrName + " for " + on, e);
         }
     }
 
     @Override
-    public Object getAttributeCurrentValue(ObjectName on, String attrName) {
+    public Object getAttributeCurrentValue(final ObjectName on, final String attrName) {
         return getAttribute(on, attrName).getValue();
     }
 
     @Override
-    public void validateBean(ObjectName configBeanON)
+    public void validateBean(final ObjectName configBeanON)
             throws ValidationException {
         try {
             configMBeanServer.invoke(configBeanON, "validate", null, null);
-        } catch (MBeanException e) {
+        } catch (final MBeanException e) {
             Exception targetException = e.getTargetException();
             if (targetException instanceof ValidationException){
                 throw (ValidationException) targetException;
             } else {
                 throw new RuntimeException(e);
             }
-        } catch (JMException e) {
+        } catch (final JMException e) {
             throw new RuntimeException(e);
         }
     }
 
     @Override
-    public void setAttribute(ObjectName on, String attrName, Attribute attribute) {
+    public void setAttribute(final ObjectName on, final String attrName, final Attribute attribute) {
         if (ObjectNameUtil.getTransactionName(on) == null) {
             throw new IllegalArgumentException("Not in transaction instance "
                     + on + ", no transaction name present");
@@ -291,7 +291,7 @@ public class ConfigTransactionJMXClient implements ConfigTransactionClient {
 
         try {
             configMBeanServer.setAttribute(on, attribute);
-        } catch (JMException e) {
+        } catch (final JMException e) {
             throw new IllegalStateException("Unable to set attribute "
                     + attrName + " for " + on, e);
         }
index 2f18bf0d0128f56dd3be876e47f31e9ace745a75..cf96e2630da0feb1573aba911dbee9247b105ee1 100644 (file)
@@ -55,7 +55,7 @@ public class DocumentedException extends Exception {
             BUILDER_FACTORY.setFeature("http://xml.org/sax/features/external-parameter-entities", false);
             BUILDER_FACTORY.setXIncludeAware(false);
             BUILDER_FACTORY.setExpandEntityReferences(false);
-        } catch (ParserConfigurationException e) {
+        } catch (final ParserConfigurationException e) {
             throw new ExceptionInInitializerError(e);
         }
         BUILDER_FACTORY.setNamespaceAware(true);
@@ -72,7 +72,7 @@ public class DocumentedException extends Exception {
 
         private final String typeValue;
 
-        ErrorType(String typeValue) {
+        ErrorType(final String typeValue) {
             this.typeValue = Preconditions.checkNotNull(typeValue);
         }
 
@@ -88,7 +88,7 @@ public class DocumentedException extends Exception {
             return this.typeValue;
         }
 
-        public static ErrorType from(String text) {
+        public static ErrorType from(final String text) {
             for (ErrorType e : values()) {
                if (e.getTypeValue().equalsIgnoreCase(text)) {
                    return e;
@@ -130,7 +130,7 @@ public class DocumentedException extends Exception {
             return this.tagValue;
         }
 
-        public static ErrorTag from( String text ) {
+        public static ErrorTag from( final String text ) {
             for( ErrorTag e: values() )
             {
                 if( e.getTagValue().equals( text ) ) {
@@ -148,7 +148,7 @@ public class DocumentedException extends Exception {
 
         private final String severityValue;
 
-        ErrorSeverity(String severityValue) {
+        ErrorSeverity(final String severityValue) {
             this.severityValue = Preconditions.checkNotNull(severityValue);
         }
 
@@ -164,7 +164,7 @@ public class DocumentedException extends Exception {
             return this.severityValue;
         }
 
-        public static ErrorSeverity from(String text) {
+        public static ErrorSeverity from(final String text) {
             for (ErrorSeverity e : values()) {
                 if (e.getSeverityValue().equalsIgnoreCase(text)) {
                     return e;
@@ -180,7 +180,7 @@ public class DocumentedException extends Exception {
     private final ErrorSeverity errorSeverity;
     private final Map<String, String> errorInfo;
 
-    public DocumentedException(String message) {
+    public DocumentedException(final String message) {
         this(message,
                 DocumentedException.ErrorType.APPLICATION,
                 DocumentedException.ErrorTag.INVALID_VALUE,
@@ -216,27 +216,27 @@ public class DocumentedException extends Exception {
         this.errorInfo = errorInfo;
     }
 
-    public static <E extends Exception> DocumentedException wrap(E exception) throws DocumentedException {
+    public static <E extends Exception> DocumentedException wrap(final E exception) throws DocumentedException {
         final Map<String, String> errorInfo = new HashMap<>();
         errorInfo.put(ErrorTag.OPERATION_FAILED.name(), "Exception thrown");
         throw new DocumentedException(exception.getMessage(), exception, ErrorType.APPLICATION, ErrorTag.OPERATION_FAILED,
                 ErrorSeverity.ERROR, errorInfo);
     }
-    public static DocumentedException wrap(ValidationException e) throws DocumentedException {
+    public static DocumentedException wrap(final ValidationException e) throws DocumentedException {
         final Map<String, String> errorInfo = new HashMap<>();
         errorInfo.put(ErrorTag.OPERATION_FAILED.name(), "Validation failed");
         throw new DocumentedException(e.getMessage(), e, ErrorType.APPLICATION, ErrorTag.OPERATION_FAILED,
                 ErrorSeverity.ERROR, errorInfo);
     }
 
-    public static DocumentedException wrap(ConflictingVersionException e) throws DocumentedException {
+    public static DocumentedException wrap(final ConflictingVersionException e) throws DocumentedException {
         final Map<String, String> errorInfo = new HashMap<>();
         errorInfo.put(ErrorTag.OPERATION_FAILED.name(), "Optimistic lock failed");
         throw new DocumentedException(e.getMessage(), e, ErrorType.APPLICATION, ErrorTag.OPERATION_FAILED,
                 ErrorSeverity.ERROR, errorInfo);
     }
 
-    public static DocumentedException fromXMLDocument( Document fromDoc ) {
+    public static DocumentedException fromXMLDocument( final Document fromDoc ) {
 
         ErrorType errorType = ErrorType.APPLICATION;
         ErrorTag errorTag = ErrorTag.OPERATION_FAILED;
@@ -281,7 +281,7 @@ public class DocumentedException extends Exception {
         return new DocumentedException( errorMessage, errorType, errorTag, errorSeverity, errorInfo );
     }
 
-    private static Map<String, String> parseErrorInfo( Node node ) {
+    private static Map<String, String> parseErrorInfo( final Node node ) {
         Map<String, String> infoMap = new HashMap<>();
         NodeList children = node.getChildNodes();
         for( int i = 0; i < children.getLength(); i++ ) {
@@ -344,7 +344,7 @@ public class DocumentedException extends Exception {
                 }
             }
         }
-        catch( ParserConfigurationException e ) {
+        catch( final ParserConfigurationException e ) {
             // this shouldn't happen
             LOG.error("Error outputting to XML document", e);
         }
@@ -352,7 +352,7 @@ public class DocumentedException extends Exception {
         return doc;
     }
 
-    private Node createTextNode( Document doc, String tag, String textContent ) {
+    private Node createTextNode( final Document doc, final String tag, final String textContent ) {
         Node node = doc.createElementNS( URN_IETF_PARAMS_XML_NS_NETCONF_BASE_1_0, tag );
         node.setTextContent( textContent );
         return node;
index d58acf128e0d2c2846a37e62ba1bcf171f2f8158..1ebb0047eb81f2afa1d9978c3ef44ff6d5bb12d9 100644 (file)
@@ -38,19 +38,19 @@ public final class XmlElement {
     private final Element element;
     private static final Logger LOG = LoggerFactory.getLogger(XmlElement.class);
 
-    private XmlElement(Element element) {
+    private XmlElement(final Element element) {
         this.element = element;
     }
 
-    public static XmlElement fromDomElement(Element e) {
+    public static XmlElement fromDomElement(final Element e) {
         return new XmlElement(e);
     }
 
-    public static XmlElement fromDomDocument(Document xml) {
+    public static XmlElement fromDomDocument(final Document xml) {
         return new XmlElement(xml.getDocumentElement());
     }
 
-    public static XmlElement fromString(String s) throws DocumentedException {
+    public static XmlElement fromString(final String s) throws DocumentedException {
         try {
             return new XmlElement(XmlUtil.readXmlToElement(s));
         } catch (IOException | SAXException e) {
@@ -58,13 +58,13 @@ public final class XmlElement {
         }
     }
 
-    public static XmlElement fromDomElementWithExpected(Element element, String expectedName) throws DocumentedException {
+    public static XmlElement fromDomElementWithExpected(final Element element, final String expectedName) throws DocumentedException {
         XmlElement xmlElement = XmlElement.fromDomElement(element);
         xmlElement.checkName(expectedName);
         return xmlElement;
     }
 
-    public static XmlElement fromDomElementWithExpected(Element element, String expectedName, String expectedNamespace) throws DocumentedException {
+    public static XmlElement fromDomElementWithExpected(final Element element, final String expectedName, final String expectedNamespace) throws DocumentedException {
         XmlElement xmlElement = XmlElement.fromDomElementWithExpected(element, expectedName);
         xmlElement.checkNamespace(expectedNamespace);
         return xmlElement;
@@ -104,7 +104,7 @@ public final class XmlElement {
         return namespaces;
     }
 
-    public void checkName(String expectedName) throws UnexpectedElementException {
+    public void checkName(final String expectedName) throws UnexpectedElementException {
         if (!getName().equals(expectedName)){
             throw new UnexpectedElementException(String.format("Expected %s xml element but was %s", expectedName,
                     getName()),
@@ -114,7 +114,7 @@ public final class XmlElement {
         }
     }
 
-    public void checkNamespaceAttribute(String expectedNamespace) throws UnexpectedNamespaceException, MissingNameSpaceException {
+    public void checkNamespaceAttribute(final String expectedNamespace) throws UnexpectedNamespaceException, MissingNameSpaceException {
         if (!getNamespaceAttribute().equals(expectedNamespace))
         {
             throw new UnexpectedNamespaceException(String.format("Unexpected namespace %s should be %s",
@@ -126,7 +126,7 @@ public final class XmlElement {
         }
     }
 
-    public void checkNamespace(String expectedNamespace) throws UnexpectedNamespaceException, MissingNameSpaceException {
+    public void checkNamespace(final String expectedNamespace) throws UnexpectedNamespaceException, MissingNameSpaceException {
         if (!getNamespace().equals(expectedNamespace))
         {
             throw new UnexpectedNamespaceException(String.format("Unexpected namespace %s should be %s",
@@ -146,19 +146,19 @@ public final class XmlElement {
         return element.getTagName();
     }
 
-    public String getAttribute(String attributeName) {
+    public String getAttribute(final String attributeName) {
         return element.getAttribute(attributeName);
     }
 
-    public String getAttribute(String attributeName, String namespace) {
+    public String getAttribute(final String attributeName, final String namespace) {
         return element.getAttributeNS(namespace, attributeName);
     }
 
-    public NodeList getElementsByTagName(String name) {
+    public NodeList getElementsByTagName(final String name) {
         return element.getElementsByTagName(name);
     }
 
-    public void appendChild(Element element) {
+    public void appendChild(final Element element) {
         this.element.appendChild(element);
     }
 
@@ -182,7 +182,7 @@ public final class XmlElement {
     /**
      * Non recursive
      */
-    private List<XmlElement> getChildElementsInternal(ElementFilteringStrategy strat) {
+    private List<XmlElement> getChildElementsInternal(final ElementFilteringStrategy strat) {
         NodeList childNodes = element.getChildNodes();
         final List<XmlElement> result = new ArrayList<>();
         for (int i = 0; i < childNodes.getLength(); i++) {
@@ -201,17 +201,17 @@ public final class XmlElement {
     public List<XmlElement> getChildElements() {
         return getChildElementsInternal(new ElementFilteringStrategy() {
             @Override
-            public boolean accept(Element e) {
+            public boolean accept(final Element e) {
                 return true;
             }
         });
     }
 
-    public List<XmlElement> getChildElementsWithinNamespace(final String childName, String namespace) {
+    public List<XmlElement> getChildElementsWithinNamespace(final String childName, final String namespace) {
         return Lists.newArrayList(Collections2.filter(getChildElementsWithinNamespace(namespace),
                 new Predicate<XmlElement>() {
                     @Override
-                    public boolean apply(XmlElement xmlElement) {
+                    public boolean apply(final XmlElement xmlElement) {
                         return xmlElement.getName().equals(childName);
                     }
                 }));
@@ -220,10 +220,10 @@ public final class XmlElement {
     public List<XmlElement> getChildElementsWithinNamespace(final String namespace) {
         return getChildElementsInternal(new ElementFilteringStrategy() {
             @Override
-            public boolean accept(Element e) {
+            public boolean accept(final Element e) {
                 try {
                     return XmlElement.fromDomElement(e).getNamespace().equals(namespace);
-                } catch (MissingNameSpaceException e1) {
+                } catch (final MissingNameSpaceException e1) {
                     return false;
                 }
             }
@@ -239,14 +239,14 @@ public final class XmlElement {
     public List<XmlElement> getChildElements(final String tagName) {
         return getChildElementsInternal(new ElementFilteringStrategy() {
             @Override
-            public boolean accept(Element e) {
+            public boolean accept(final Element e) {
                 // localName returns pure localName without prefix
                 return e.getLocalName().equals(tagName);
             }
         });
     }
 
-    public XmlElement getOnlyChildElement(String childName) throws DocumentedException {
+    public XmlElement getOnlyChildElement(final String childName) throws DocumentedException {
         List<XmlElement> nameElements = getChildElements(childName);
         if (nameElements.size() != 1){
             throw new DocumentedException("One element " + childName + " expected in " + toString(),
@@ -257,7 +257,7 @@ public final class XmlElement {
         return nameElements.get(0);
     }
 
-    public Optional<XmlElement> getOnlyChildElementOptionally(String childName) {
+    public Optional<XmlElement> getOnlyChildElementOptionally(final String childName) {
         List<XmlElement> nameElements = getChildElements(childName);
         if (nameElements.size() != 1) {
             return Optional.absent();
@@ -269,7 +269,7 @@ public final class XmlElement {
         List<XmlElement> children = getChildElementsWithinNamespace(namespace);
         children = Lists.newArrayList(Collections2.filter(children, new Predicate<XmlElement>() {
             @Override
-            public boolean apply(XmlElement xmlElement) {
+            public boolean apply(final XmlElement xmlElement) {
                 return xmlElement.getName().equals(childName);
             }
         }));
@@ -279,7 +279,7 @@ public final class XmlElement {
         return Optional.of(children.get(0));
     }
 
-    public XmlElement getOnlyChildElementWithSameNamespace(String childName) throws  DocumentedException {
+    public XmlElement getOnlyChildElementWithSameNamespace(final String childName) throws  DocumentedException {
         return getOnlyChildElement(childName, getNamespace());
     }
 
@@ -289,7 +289,7 @@ public final class XmlElement {
             List<XmlElement> children = getChildElementsWithinNamespace(namespace.get());
             children = Lists.newArrayList(Collections2.filter(children, new Predicate<XmlElement>() {
                 @Override
-                public boolean apply(XmlElement xmlElement) {
+                public boolean apply(final XmlElement xmlElement) {
                     return xmlElement.getName().equals(childName);
                 }
             }));
@@ -318,11 +318,11 @@ public final class XmlElement {
         return Optional.absent();
     }
 
-    public XmlElement getOnlyChildElement(final String childName, String namespace) throws DocumentedException {
+    public XmlElement getOnlyChildElement(final String childName, final String namespace) throws DocumentedException {
         List<XmlElement> children = getChildElementsWithinNamespace(namespace);
         children = Lists.newArrayList(Collections2.filter(children, new Predicate<XmlElement>() {
             @Override
-            public boolean apply(XmlElement xmlElement) {
+            public boolean apply(final XmlElement xmlElement) {
                 return xmlElement.getName().equals(childName);
             }
         }));
@@ -434,7 +434,7 @@ public final class XmlElement {
         if (element.getNamespaceURI() != null) {
             try {
                 sb.append(", namespace='").append(getNamespace()).append('\'');
-            } catch (MissingNameSpaceException e) {
+            } catch (final MissingNameSpaceException e) {
                 LOG.trace("Missing namespace for element.");
             }
         }
@@ -476,14 +476,14 @@ public final class XmlElement {
         List<XmlElement> children = getChildElementsWithinNamespace(getNamespace());
         return Lists.newArrayList(Collections2.filter(children, new Predicate<XmlElement>() {
             @Override
-            public boolean apply(XmlElement xmlElement) {
+            public boolean apply(final XmlElement xmlElement) {
                 return xmlElement.getName().equals(childName);
             }
         }));
     }
 
-    public void checkUnrecognisedElements(List<XmlElement> recognisedElements,
-                                          XmlElement... additionalRecognisedElements) throws DocumentedException {
+    public void checkUnrecognisedElements(final List<XmlElement> recognisedElements,
+                                          final XmlElement... additionalRecognisedElements) throws DocumentedException {
         List<XmlElement> childElements = getChildElements();
         childElements.removeAll(recognisedElements);
         for (XmlElement additionalRecognisedElement : additionalRecognisedElements) {
@@ -497,12 +497,12 @@ public final class XmlElement {
         }
     }
 
-    public void checkUnrecognisedElements(XmlElement... additionalRecognisedElements) throws DocumentedException {
+    public void checkUnrecognisedElements(final XmlElement... additionalRecognisedElements) throws DocumentedException {
         checkUnrecognisedElements(Collections.<XmlElement>emptyList(), additionalRecognisedElements);
     }
 
     @Override
-    public boolean equals(Object o) {
+    public boolean equals(final Object o) {
         if (this == o) {
             return true;
         }
index a69bab5cb133375a792c5320da5979eb151cb4a2..fb27d6eae21e56084f77ae171ffc750451d9def7 100644 (file)
@@ -57,7 +57,7 @@ public final class XmlUtil {
             // Performance improvement for messages with size <10k according to
             // https://xerces.apache.org/xerces2-j/faq-performance.html
             factory.setFeature("http://apache.org/xml/features/dom/defer-node-expansion", false);
-        } catch (ParserConfigurationException e) {
+        } catch (final ParserConfigurationException e) {
             throw new ExceptionInInitializerError(e);
         }
         factory.setNamespaceAware(true);
@@ -72,13 +72,13 @@ public final class XmlUtil {
         protected DocumentBuilder initialValue() {
             try {
                 return BUILDER_FACTORY.newDocumentBuilder();
-            } catch (ParserConfigurationException e) {
+            } catch (final ParserConfigurationException e) {
                 throw new IllegalStateException("Failed to create threadLocal dom builder", e);
             }
         }
 
         @Override
-        public void set(DocumentBuilder value) {
+        public void set(final DocumentBuilder value) {
             throw new UnsupportedOperationException();
         }
     };
@@ -199,7 +199,7 @@ public final class XmlUtil {
 
         try {
             return SCHEMA_FACTORY.newSchema(sources);
-        } catch (SAXException e) {
+        } catch (final SAXException e) {
             throw new IllegalStateException("Failed to instantiate XML schema", e);
         }
     }
@@ -207,7 +207,7 @@ public final class XmlUtil {
     public static Object evaluateXPath(final XPathExpression expr, final Object rootNode, final QName returnType) {
         try {
             return expr.evaluate(rootNode, returnType);
-        } catch (XPathExpressionException e) {
+        } catch (final XPathExpressionException e) {
             throw new IllegalStateException("Error while evaluating xpath expression " + expr, e);
         }
     }
index 37b08e4671cd1b424a140799fe6cc47036d33fd9..29cddab15be085522151bb9b0991de47fae52f4f 100644 (file)
@@ -65,7 +65,7 @@ public class ConfigTransactionClientsTest {
     }
 
     private Set<ObjectName> testClientLookupConfigBeans(
-            ConfigTransactionClient client) {
+            final ConfigTransactionClient client) {
         Set<ObjectName> beans = client.lookupConfigBeans();
         for (ObjectName on : beans) {
             assertEquals("Module", on.getKeyProperty("type"));
@@ -80,7 +80,7 @@ public class ConfigTransactionClientsTest {
         assertEquals(testClientGetObjectName(jmxTransactionClient), true);
     }
 
-    private boolean testClientGetObjectName(ConfigTransactionClient client) {
+    private boolean testClientGetObjectName(final ConfigTransactionClient client) {
         return transactionControllerON.equals(client.getObjectName());
     }
 
@@ -91,7 +91,7 @@ public class ConfigTransactionClientsTest {
     }
 
     private Set<String> testClientGetAvailableModuleNames(
-            ConfigTransactionClient client) {
+            final ConfigTransactionClient client) {
         return client.getAvailableModuleNames();
     }
 
@@ -101,7 +101,7 @@ public class ConfigTransactionClientsTest {
         assertEquals("transactionName", jmxTN);
     }
 
-    private String testClientGetTransactionName(ConfigTransactionClient client) {
+    private String testClientGetTransactionName(final ConfigTransactionClient client) {
         return client.getTransactionName();
     }
 
@@ -145,7 +145,7 @@ public class ConfigTransactionClientsTest {
         Assert.assertNotNull(on);
     }
 
-    private ObjectName testClientCreateModule(ConfigTransactionClient client)
+    private ObjectName testClientCreateModule(final ConfigTransactionClient client)
             throws Exception {
         return client.createModule("testModuleName", "testInstanceName");
     }
@@ -169,7 +169,7 @@ public class ConfigTransactionClientsTest {
     }
 
     private Set<ObjectName> testClientLookupConfigBeans2(
-            ConfigTransactionClient client, String moduleName) {
+            final ConfigTransactionClient client, final String moduleName) {
         Set<ObjectName> beans = client.lookupConfigBeans(moduleName);
         assertEquals(1, beans.size());
         return beans;
@@ -183,8 +183,8 @@ public class ConfigTransactionClientsTest {
     }
 
     private Set<ObjectName> testClientLookupConfigBean(
-            ConfigTransactionClient client, String moduleName,
-            String instanceName) {
+            final ConfigTransactionClient client, final String moduleName,
+            final String instanceName) {
         Set<ObjectName> beans = client.lookupConfigBeans(moduleName,
                 instanceName);
         assertEquals(1, beans.size());
@@ -199,8 +199,8 @@ public class ConfigTransactionClientsTest {
     }
 
     private Set<ObjectName> testClientLookupConfigBeans3(
-            ConfigTransactionClient client, String moduleName,
-            String instanceName) {
+            final ConfigTransactionClient client, final String moduleName,
+            final String instanceName) {
         Set<ObjectName> beans = client.lookupConfigBeans(moduleName,
                 instanceName);
         assertEquals(1, beans.size());
index f9d0a5c647a56876ed0aa69f3a3131189c31c479..9a6f931afdd0e1ac6752e944da117bf95631ab1b 100644 (file)
@@ -104,7 +104,7 @@ public class LookupTest {
         test(method, args);
     }
 
-    private void test(Method method, Object[] args) throws Exception {
+    private void test(final Method method, final Object[] args) throws Exception {
         for (Entry<LookupRegistry, ? extends Set<? extends LookupRegistry>> entry : lookupProvidersToClients
                 .entrySet()) {
             Object expected = method.invoke(entry.getKey(), args);
@@ -125,7 +125,7 @@ public class LookupTest {
                     client.lookupConfigBean(
                             InstanceNotFoundException.class.getSimpleName(), "");
                     fail(client.toString());
-                } catch (InstanceNotFoundException e) {
+                } catch (final InstanceNotFoundException e) {
 
                 }
             }
index 8732aa72d127a8d95831e7b34a34e5e5bb01ff3b..cf1fe92638b71b6f04a69462d342615c7e896545 100644 (file)
@@ -76,7 +76,7 @@ public class TestingConfigRegistry implements ConfigRegistryMXBean {
     }
 
     @Override
-    public CommitStatus commitConfig(ObjectName transactonControllerON)
+    public CommitStatus commitConfig(final ObjectName transactonControllerON)
             throws ConflictingVersionException, ValidationException {
         if (transactonControllerON == null) {
             Exception e = new RuntimeException("message");
@@ -107,7 +107,7 @@ public class TestingConfigRegistry implements ConfigRegistryMXBean {
     }
 
     @Override
-    public Set<ObjectName> lookupConfigBeans(String moduleName) {
+    public Set<ObjectName> lookupConfigBeans(final String moduleName) {
         if (moduleName.equals(moduleName1)) {
             return Sets.newHashSet(conf1, conf2);
         } else if (moduleName.equals(moduleName2)) {
@@ -118,8 +118,8 @@ public class TestingConfigRegistry implements ConfigRegistryMXBean {
     }
 
     @Override
-    public Set<ObjectName> lookupConfigBeans(String moduleName,
-            String instanceName) {
+    public Set<ObjectName> lookupConfigBeans(final String moduleName,
+            final String instanceName) {
         if (moduleName.equals(moduleName1) && instanceName.equals(instName1)) {
             return Sets.newHashSet(conf2);
         } else if (moduleName.equals(moduleName2)
@@ -131,7 +131,7 @@ public class TestingConfigRegistry implements ConfigRegistryMXBean {
     }
 
     @Override
-    public ObjectName lookupConfigBean(String moduleName, String instanceName)
+    public ObjectName lookupConfigBean(final String moduleName, final String instanceName)
             throws InstanceNotFoundException {
         if (moduleName.equals(InstanceNotFoundException.class.getSimpleName())) {
             throw new InstanceNotFoundException();
@@ -145,8 +145,8 @@ public class TestingConfigRegistry implements ConfigRegistryMXBean {
     }
 
     @Override
-    public Set<ObjectName> lookupRuntimeBeans(String moduleName,
-            String instanceName) {
+    public Set<ObjectName> lookupRuntimeBeans(final String moduleName,
+            final String instanceName) {
         if (moduleName.equals(moduleName1) && instanceName.equals(instName1)) {
             return Sets.<ObjectName> newHashSet(run2);
         } else if (moduleName.equals(moduleName2)
@@ -158,7 +158,7 @@ public class TestingConfigRegistry implements ConfigRegistryMXBean {
     }
 
     @Override
-    public void checkConfigBeanExists(ObjectName objectName) throws InstanceNotFoundException {
+    public void checkConfigBeanExists(final ObjectName objectName) throws InstanceNotFoundException {
         Set<ObjectName> configBeans = Sets.<ObjectName> newHashSet(run1, run2, run3);
         if(configBeans.size()>0){
             checkBool = true;
@@ -166,7 +166,7 @@ public class TestingConfigRegistry implements ConfigRegistryMXBean {
     }
 
     @Override
-    public ObjectName lookupConfigBeanByServiceInterfaceName(String serviceInterfaceQName, String refName) {
+    public ObjectName lookupConfigBeanByServiceInterfaceName(final String serviceInterfaceQName, final String refName) {
         if (serviceInterfaceQName.equals(serviceQName1) && refName.equals(refName1)) {
             return conf1;
         }
@@ -181,7 +181,7 @@ public class TestingConfigRegistry implements ConfigRegistryMXBean {
     }
 
     @Override
-    public Map<String, ObjectName> lookupServiceReferencesByServiceInterfaceName(String serviceInterfaceQName) {
+    public Map<String, ObjectName> lookupServiceReferencesByServiceInterfaceName(final String serviceInterfaceQName) {
 
         if(serviceInterfaceQName.equals(serviceQName1)){
             map.put("conf1", conf1);
@@ -196,12 +196,12 @@ public class TestingConfigRegistry implements ConfigRegistryMXBean {
     }
 
     @Override
-    public Set<String> lookupServiceInterfaceNames(ObjectName objectName) throws InstanceNotFoundException {
+    public Set<String> lookupServiceInterfaceNames(final ObjectName objectName) throws InstanceNotFoundException {
         return Sets.<String> newHashSet(serviceQName1, serviceQName2);
     }
 
     @Override
-    public String getServiceInterfaceName(String namespace, String localName) {
+    public String getServiceInterfaceName(final String namespace, final String localName) {
         return null;
     }
 
@@ -211,12 +211,12 @@ public class TestingConfigRegistry implements ConfigRegistryMXBean {
     }
 
     @Override
-    public ObjectName getServiceReference(String serviceInterfaceQName, String refName) throws InstanceNotFoundException {
+    public ObjectName getServiceReference(final String serviceInterfaceQName, final String refName) throws InstanceNotFoundException {
         return conf1;
     }
 
     @Override
-    public void checkServiceReferenceExists(ObjectName objectName) throws InstanceNotFoundException {
+    public void checkServiceReferenceExists(final ObjectName objectName) throws InstanceNotFoundException {
         throw new UnsupportedOperationException();
     }
 }
index d3b8add96d5ac98ab7e669a22a8adb8009c716fb..b1826e028af5e70c6eec5bb56a80b76c9bc7b77e 100644 (file)
@@ -54,7 +54,7 @@ public class TestingConfigTransactionController implements
     }
 
     @Override
-    public ObjectName createModule(String moduleName, String instanceName)
+    public ObjectName createModule(final String moduleName, final String instanceName)
             throws InstanceAlreadyExistsException {
         //return null;
         return ObjectNameUtil.createON(ObjectNameUtil.ON_DOMAIN
@@ -63,11 +63,11 @@ public class TestingConfigTransactionController implements
     }
 
     @Override
-    public void reCreateModule(ObjectName objectName) {
+    public void reCreateModule(final ObjectName objectName) {
     }
 
     @Override
-    public void destroyModule(ObjectName objectName)
+    public void destroyModule(final ObjectName objectName)
             throws InstanceNotFoundException {
         if(objectName != null){
             conf4 = null;
@@ -99,7 +99,7 @@ public class TestingConfigTransactionController implements
     }
 
     @Override
-    public Set<ObjectName> lookupConfigBeans(String moduleName) {
+    public Set<ObjectName> lookupConfigBeans(final String moduleName) {
         if (moduleName.equals(moduleName1)) {
             return Sets.newHashSet(conf1, conf2);
         } else if (moduleName.equals(moduleName2)) {
@@ -110,7 +110,7 @@ public class TestingConfigTransactionController implements
     }
 
     @Override
-    public ObjectName lookupConfigBean(String moduleName, String instanceName)
+    public ObjectName lookupConfigBean(final String moduleName, final String instanceName)
             throws InstanceNotFoundException {
         if (moduleName.equals(InstanceNotFoundException.class.getSimpleName())) {
             throw new InstanceNotFoundException();
@@ -119,8 +119,8 @@ public class TestingConfigTransactionController implements
     }
 
     @Override
-    public Set<ObjectName> lookupConfigBeans(String moduleName,
-            String instanceName) {
+    public Set<ObjectName> lookupConfigBeans(final String moduleName,
+            final String instanceName) {
         if (moduleName.equals(moduleName1) && instanceName.equals(instName1)) {
             return Sets.newHashSet(conf2);
         } else if (moduleName.equals(moduleName2)
@@ -132,17 +132,17 @@ public class TestingConfigTransactionController implements
     }
 
     @Override
-    public void checkConfigBeanExists(ObjectName objectName) throws InstanceNotFoundException {
+    public void checkConfigBeanExists(final ObjectName objectName) throws InstanceNotFoundException {
         check = "configBeanExists";
     }
 
     @Override
-    public ObjectName saveServiceReference(String serviceInterfaceName, String refName, ObjectName moduleON) throws InstanceNotFoundException {
+    public ObjectName saveServiceReference(final String serviceInterfaceName, final String refName, final ObjectName moduleON) throws InstanceNotFoundException {
         return moduleON;
     }
 
     @Override
-    public void removeServiceReference(String serviceInterfaceName, String refName) {
+    public void removeServiceReference(final String serviceInterfaceName, final String refName) {
         check = refName;
     }
 
@@ -152,7 +152,7 @@ public class TestingConfigTransactionController implements
     }
 
     @Override
-    public ObjectName lookupConfigBeanByServiceInterfaceName(String serviceInterfaceQName, String refName) {
+    public ObjectName lookupConfigBeanByServiceInterfaceName(final String serviceInterfaceQName, final String refName) {
         return conf3;
     }
 
@@ -164,23 +164,23 @@ public class TestingConfigTransactionController implements
     }
 
     @Override
-    public Map<String, ObjectName> lookupServiceReferencesByServiceInterfaceName(String serviceInterfaceQName) {
+    public Map<String, ObjectName> lookupServiceReferencesByServiceInterfaceName(final String serviceInterfaceQName) {
         mapSub.put("A",conf2);
         return mapSub;
     }
 
     @Override
-    public Set<String> lookupServiceInterfaceNames(ObjectName objectName) throws InstanceNotFoundException {
+    public Set<String> lookupServiceInterfaceNames(final ObjectName objectName) throws InstanceNotFoundException {
         return Sets.newHashSet("setA");
     }
 
     @Override
-    public String getServiceInterfaceName(String namespace, String localName) {
+    public String getServiceInterfaceName(final String namespace, final String localName) {
         return check=namespace+localName;
     }
 
     @Override
-    public boolean removeServiceReferences(ObjectName objectName) throws InstanceNotFoundException {
+    public boolean removeServiceReferences(final ObjectName objectName) throws InstanceNotFoundException {
         return true;
     }
 
@@ -200,12 +200,12 @@ public class TestingConfigTransactionController implements
     }
 
     @Override
-    public ObjectName getServiceReference(String serviceInterfaceQName, String refName) throws InstanceNotFoundException {
+    public ObjectName getServiceReference(final String serviceInterfaceQName, final String refName) throws InstanceNotFoundException {
         return conf3;
     }
 
     @Override
-    public void checkServiceReferenceExists(ObjectName objectName) throws InstanceNotFoundException {
+    public void checkServiceReferenceExists(final ObjectName objectName) throws InstanceNotFoundException {
         check = "referenceExist";
     }
 }