Merge "Fix checkstyle warnings in yang-jmx-generator."
authorTony Tkacik <ttkacik@cisco.com>
Tue, 9 Dec 2014 15:46:22 +0000 (15:46 +0000)
committerGerrit Code Review <gerrit@opendaylight.org>
Tue, 9 Dec 2014 15:46:22 +0000 (15:46 +0000)
20 files changed:
opendaylight/config/yang-jmx-generator/src/main/java/org/opendaylight/controller/config/yangjmxgenerator/ModuleMXBeanEntryBuilder.java
opendaylight/config/yang-jmx-generator/src/main/java/org/opendaylight/controller/config/yangjmxgenerator/PackageTranslator.java
opendaylight/config/yang-jmx-generator/src/main/java/org/opendaylight/controller/config/yangjmxgenerator/RuntimeBeanEntry.java
opendaylight/config/yang-jmx-generator/src/main/java/org/opendaylight/controller/config/yangjmxgenerator/ServiceInterfaceEntry.java
opendaylight/config/yang-jmx-generator/src/main/java/org/opendaylight/controller/config/yangjmxgenerator/attribute/AbstractAttribute.java
opendaylight/config/yang-jmx-generator/src/main/java/org/opendaylight/controller/config/yangjmxgenerator/attribute/DependencyAttribute.java
opendaylight/config/yang-jmx-generator/src/main/java/org/opendaylight/controller/config/yangjmxgenerator/attribute/JavaAttribute.java
opendaylight/config/yang-jmx-generator/src/main/java/org/opendaylight/controller/config/yangjmxgenerator/attribute/ListAttribute.java
opendaylight/config/yang-jmx-generator/src/main/java/org/opendaylight/controller/config/yangjmxgenerator/attribute/ListDependenciesAttribute.java
opendaylight/config/yang-jmx-generator/src/main/java/org/opendaylight/controller/config/yangjmxgenerator/attribute/SimpleTypeResolver.java
opendaylight/config/yang-jmx-generator/src/main/java/org/opendaylight/controller/config/yangjmxgenerator/attribute/TOAttribute.java
opendaylight/config/yang-jmx-generator/src/test/java/org/opendaylight/controller/config/yangjmxgenerator/AbstractYangTest.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/PackageTranslatorTest.java
opendaylight/config/yang-jmx-generator/src/test/java/org/opendaylight/controller/config/yangjmxgenerator/RuntimeBeanEntryTest.java
opendaylight/config/yang-jmx-generator/src/test/java/org/opendaylight/controller/config/yangjmxgenerator/SchemaContextTest.java
opendaylight/config/yang-jmx-generator/src/test/java/org/opendaylight/controller/config/yangjmxgenerator/ServiceInterfaceEntryTest.java
opendaylight/config/yang-jmx-generator/src/test/java/org/opendaylight/controller/config/yangjmxgenerator/plugin/util/YangModelSearchUtils.java
opendaylight/config/yang-jmx-generator/src/test/java/org/opendaylight/controller/config/yangjmxgenerator/unknownextension/UnknownExtensionTest.java

index f99d378b6f3e9175be67fed5284827d0ff50b4db..80db46df2b5eaa627a84f8e2aaf2fa97a9aed6d5 100644 (file)
@@ -18,7 +18,6 @@ import com.google.common.base.Optional;
 import com.google.common.collect.Collections2;
 import com.google.common.collect.Maps;
 import com.google.common.collect.Sets;
-
 import java.util.Collection;
 import java.util.Collections;
 import java.util.HashMap;
@@ -27,9 +26,7 @@ import java.util.Objects;
 import java.util.Set;
 import java.util.regex.Matcher;
 import java.util.regex.Pattern;
-
 import javax.annotation.Nullable;
-
 import org.opendaylight.controller.config.yangjmxgenerator.attribute.AbstractDependencyAttribute;
 import org.opendaylight.controller.config.yangjmxgenerator.attribute.AttributeIfc;
 import org.opendaylight.controller.config.yangjmxgenerator.attribute.DependencyAttribute;
@@ -93,7 +90,7 @@ final class ModuleMXBeanEntryBuilder {
         return this;
     }
 
-    private static final Logger LOGGER = LoggerFactory
+    private static final Logger LOG = LoggerFactory
             .getLogger(ModuleMXBeanEntryBuilder.class);
 
     // TODO: the XPath should be parsed by code generator IMO
@@ -108,7 +105,7 @@ final class ModuleMXBeanEntryBuilder {
 
 
     public Map<String, ModuleMXBeanEntry> build() {
-        LOGGER.debug("Generating ModuleMXBeans of {} to package {}",
+        LOG.debug("Generating ModuleMXBeans of {} to package {}",
                 currentModule.getNamespace(), packageName);
 
         String configModulePrefix;
@@ -146,7 +143,7 @@ final class ModuleMXBeanEntryBuilder {
         checkAttributeNamesUniqueness(uniqueGeneratedClassesNames, result);
         checkUnaugumentedIdentities(unaugmentedModuleIdentities);
 
-        LOGGER.debug("Number of ModuleMXBeans to be generated: {}", result.size());
+        LOG.debug("Number of ModuleMXBeans to be generated: {}", result.size());
 
         return result;
     }
@@ -166,7 +163,7 @@ final class ModuleMXBeanEntryBuilder {
 
     private static void checkUnaugumentedIdentities(final Map<String, IdentitySchemaNode> unaugmentedModuleIdentities) {
         if (unaugmentedModuleIdentities.size() > 0) {
-            LOGGER.warn("Augmentation not found for all currentModule identities: {}",
+            LOG.warn("Augmentation not found for all currentModule identities: {}",
                     unaugmentedModuleIdentities.keySet());
         }
     }
@@ -190,7 +187,7 @@ final class ModuleMXBeanEntryBuilder {
                             + identityLocalName);
                 } else {
                     moduleIdentities.put(identityLocalName, id);
-                    LOGGER.debug("Found identity {}", identityLocalName);
+                    LOG.debug("Found identity {}", identityLocalName);
                 }
                 // validation check on unknown schema nodes
                 boolean providedServiceWasSet = false;
@@ -271,12 +268,12 @@ final class ModuleMXBeanEntryBuilder {
         HAS_CHILDREN_AND_QNAME dataNodeContainer = getDataNodeContainer(choiceCaseNode);
 
         if (EXPECTED_CONFIGURATION_AUGMENTATION_SCHEMA_PATH.equals(augmentation.getTargetPath())) {
-            LOGGER.debug("Parsing configuration of {}", moduleLocalNameFromXPath);
+            LOG.debug("Parsing configuration of {}", moduleLocalNameFromXPath);
             yangToAttributes = fillConfiguration(dataNodeContainer, currentModule, typeProviderWrapper, qNamesToSIEs,
                     schemaContext, packageName);
             checkUniqueAttributesWithGeneratedClass(uniqueGeneratedClassesNames, when.getQName(), yangToAttributes);
         } else if (EXPECTED_STATE_AUGMENTATION_SCHEMA_PATH.equals(augmentation.getTargetPath())) {
-            LOGGER.debug("Parsing state of {}", moduleLocalNameFromXPath);
+            LOG.debug("Parsing state of {}", moduleLocalNameFromXPath);
             try {
                 runtimeBeans = fillRuntimeBeans(dataNodeContainer, currentModule, typeProviderWrapper, packageName,
                         moduleLocalNameFromXPath, javaNamePrefix);
@@ -309,9 +306,9 @@ final class ModuleMXBeanEntryBuilder {
                     " both state and configuration");
         } else {
             ModuleMXBeanEntry.ModuleMXBeanEntryInitial initial = new ModuleMXBeanEntry.ModuleMXBeanEntryInitialBuilder()
-            .setIdSchemaNode(moduleIdentity).setPackageName(packageName).setJavaNamePrefix(javaNamePrefix)
-            .setNamespace(currentModule.getNamespace().toString()).setqName(ModuleUtil.getQName(currentModule))
-            .build();
+                .setIdSchemaNode(moduleIdentity).setPackageName(packageName).setJavaNamePrefix(javaNamePrefix)
+                .setNamespace(currentModule.getNamespace().toString()).setqName(ModuleUtil.getQName(currentModule))
+                .build();
 
             // construct ModuleMXBeanEntry
             ModuleMXBeanEntry moduleMXBeanEntry = new ModuleMXBeanEntry(initial, yangToAttributes, providedServices,
index a7f6f2f221e295ebbf4b17b0ea7c869f1265ace8..2b130e318804bdb8c5dbf0b25dccf84847e5a3db 100644 (file)
@@ -9,7 +9,6 @@ package org.opendaylight.controller.config.yangjmxgenerator;
 
 import java.util.Map;
 import java.util.Map.Entry;
-
 import org.opendaylight.yangtools.binding.generator.util.BindingGeneratorUtil;
 import org.opendaylight.yangtools.yang.model.api.Module;
 
index aec41152de5fda3138430091e41344bc059feeaf..b6ed8243217f1e70d350342ce746d7e0e79bbdac 100644 (file)
@@ -13,7 +13,6 @@ import static com.google.common.base.Preconditions.checkState;
 import com.google.common.annotations.VisibleForTesting;
 import com.google.common.base.Optional;
 import com.google.common.collect.Lists;
-
 import java.util.ArrayList;
 import java.util.Collection;
 import java.util.Collections;
@@ -26,7 +25,6 @@ import java.util.List;
 import java.util.Map;
 import java.util.Set;
 import java.util.TreeSet;
-
 import org.opendaylight.controller.config.yangjmxgenerator.attribute.AttributeIfc;
 import org.opendaylight.controller.config.yangjmxgenerator.attribute.JavaAttribute;
 import org.opendaylight.controller.config.yangjmxgenerator.attribute.ListAttribute;
index ee02b303e0b2aa1778d2b45cffd421946411ae4f..f03bd96529a728921bd656a5998bb4be2f79868c 100644 (file)
@@ -7,6 +7,10 @@
  */
 package org.opendaylight.controller.config.yangjmxgenerator;
 
+import static com.google.common.base.Preconditions.checkNotNull;
+import static java.lang.String.format;
+import static org.opendaylight.controller.config.yangjmxgenerator.ConfigConstants.SERVICE_TYPE_Q_NAME;
+
 import com.google.common.base.Optional;
 import java.util.ArrayList;
 import java.util.HashMap;
@@ -21,9 +25,6 @@ import org.opendaylight.yangtools.yang.model.api.Module;
 import org.opendaylight.yangtools.yang.model.api.UnknownSchemaNode;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
-import static com.google.common.base.Preconditions.checkNotNull;
-import static java.lang.String.format;
-import static org.opendaylight.controller.config.yangjmxgenerator.ConfigConstants.SERVICE_TYPE_Q_NAME;
 
 /**
  * Represents identity derived from {@link ConfigConstants#SERVICE_TYPE_Q_NAME}.
@@ -46,7 +47,7 @@ import static org.opendaylight.controller.config.yangjmxgenerator.ConfigConstant
  * </p>
  */
 public class ServiceInterfaceEntry extends AbstractEntry {
-    private static final Logger LOGGER = LoggerFactory
+    private static final Logger LOG = LoggerFactory
             .getLogger(ServiceInterfaceEntry.class);
 
     private static final String CLASS_NAME_SUFFIX = "ServiceInterface";
@@ -121,7 +122,7 @@ public class ServiceInterfaceEntry extends AbstractEntry {
      */
     public static Map<QName, ServiceInterfaceEntry> create(Module currentModule,
             String packageName,Map<IdentitySchemaNode, ServiceInterfaceEntry> definedSEItracker) {
-        LOGGER.debug("Generating ServiceInterfaces from {} to package {}",
+        LOG.debug("Generating ServiceInterfaces from {} to package {}",
                 currentModule.getNamespace(), packageName);
 
         Map<IdentitySchemaNode, ServiceInterfaceEntry> identitiesToSIs = new HashMap<>();
@@ -130,7 +131,7 @@ public class ServiceInterfaceEntry extends AbstractEntry {
         int lastSize = notVisited.size() + 1;
         while (!notVisited.isEmpty()) {
             if (notVisited.size() == lastSize) {
-                LOGGER.debug(
+                LOG.debug(
                         "Following identities will be ignored while generating ServiceInterfaces, as they are not derived from {} : {}",
                         SERVICE_TYPE_Q_NAME, notVisited);
                 break;
@@ -175,7 +176,7 @@ public class ServiceInterfaceEntry extends AbstractEntry {
         for (ServiceInterfaceEntry sie : identitiesToSIs.values()) {
             resultMap.put(sie.getQName(), sie);
         }
-        LOGGER.debug("Number of ServiceInterfaces to be generated: {}",
+        LOG.debug("Number of ServiceInterfaces to be generated: {}",
                 resultMap.size());
         return resultMap;
     }
index d9a6dd045214c4f01271703a8a3c4942cae33852..e6b69fb17d2559dc61ac667acb55e2058266ef85 100644 (file)
@@ -12,7 +12,7 @@ import org.opendaylight.yangtools.yang.model.api.DataSchemaNode;
 
 public abstract class AbstractAttribute implements AttributeIfc {
     private final String attributeYangName, upperCaseCammelCase,
-            lowerCaseCammelCase;
+    lowerCaseCammelCase;
     protected final DataSchemaNode node;
 
     private static String getLocalName(DataSchemaNode attrNode) {
index d8df78af0ae7103660241e8842064d0def753c47..a82571cb19c665a90e98ba13f8b334e4fa9f82f8 100644 (file)
@@ -7,14 +7,13 @@
  */
 package org.opendaylight.controller.config.yangjmxgenerator.attribute;
 
+import javax.management.ObjectName;
+import javax.management.openmbean.SimpleType;
 import org.opendaylight.controller.config.yangjmxgenerator.ServiceInterfaceEntry;
 import org.opendaylight.yangtools.binding.generator.util.Types;
 import org.opendaylight.yangtools.sal.binding.model.api.Type;
 import org.opendaylight.yangtools.yang.model.api.DataSchemaNode;
 
-import javax.management.ObjectName;
-import javax.management.openmbean.SimpleType;
-
 public class DependencyAttribute extends AbstractDependencyAttribute {
 
 
index 8d3139999e64db347e927dfa6dfc0e083c815a55..e13c22a2ab77cf02267cac1e9a088a03ad36d090 100644 (file)
@@ -8,6 +8,13 @@
 package org.opendaylight.controller.config.yangjmxgenerator.attribute;
 
 import com.google.common.base.Preconditions;
+import java.util.Arrays;
+import java.util.List;
+import javax.management.openmbean.ArrayType;
+import javax.management.openmbean.CompositeType;
+import javax.management.openmbean.OpenDataException;
+import javax.management.openmbean.OpenType;
+import javax.management.openmbean.SimpleType;
 import org.opendaylight.controller.config.api.IdentityAttributeRef;
 import org.opendaylight.controller.config.yangjmxgenerator.TypeProviderWrapper;
 import org.opendaylight.yangtools.sal.binding.model.api.Type;
@@ -17,14 +24,6 @@ import org.opendaylight.yangtools.yang.model.api.TypeDefinition;
 import org.opendaylight.yangtools.yang.model.api.type.IdentityrefTypeDefinition;
 import org.opendaylight.yangtools.yang.model.api.type.UnionTypeDefinition;
 
-import javax.management.openmbean.ArrayType;
-import javax.management.openmbean.CompositeType;
-import javax.management.openmbean.OpenDataException;
-import javax.management.openmbean.OpenType;
-import javax.management.openmbean.SimpleType;
-import java.util.Arrays;
-import java.util.List;
-
 public class JavaAttribute extends AbstractAttribute implements TypedAttribute {
 
     public static final String DESCRIPTION_OF_VALUE_ATTRIBUTE_FOR_UNION = "valueOfArtificialUnionProperty";
@@ -233,7 +232,7 @@ public class JavaAttribute extends AbstractAttribute implements TypedAttribute {
         return simpleType;
     }
 
-     private OpenType<?> getCompositeType(Type baseType, TypeDefinition<?> baseTypeDefinition) {
+    private OpenType<?> getCompositeType(Type baseType, TypeDefinition<?> baseTypeDefinition) {
 
         SimpleType<?> innerItemType = SimpleTypeResolver.getSimpleType(baseType);
         String innerItemName = typeProviderWrapper.getJMXParamForBaseType(baseTypeDefinition);
index bb71f9dbc733da09c17e6be379bde458a0df7591..9d8996369db59867b63b6c7808879bdbbf46fd92 100644 (file)
@@ -7,6 +7,10 @@
  */
 package org.opendaylight.controller.config.yangjmxgenerator.attribute;
 
+import java.util.List;
+import javax.management.openmbean.ArrayType;
+import javax.management.openmbean.OpenDataException;
+import javax.management.openmbean.OpenType;
 import org.opendaylight.controller.config.yangjmxgenerator.TypeProviderWrapper;
 import org.opendaylight.yangtools.binding.generator.util.Types;
 import org.opendaylight.yangtools.sal.binding.model.api.Type;
@@ -14,11 +18,6 @@ import org.opendaylight.yangtools.yang.model.api.DataSchemaNode;
 import org.opendaylight.yangtools.yang.model.api.LeafListSchemaNode;
 import org.opendaylight.yangtools.yang.model.api.ListSchemaNode;
 
-import javax.management.openmbean.ArrayType;
-import javax.management.openmbean.OpenDataException;
-import javax.management.openmbean.OpenType;
-import java.util.List;
-
 public class ListAttribute extends AbstractAttribute implements TypedAttribute {
 
     private final String nullableDescription, nullableDefault;
index 641099aef382a1c8caec44a21dac0cec42d07a09..48d06a381c1b40f25e52e90d58d59536b6ec9626 100644 (file)
@@ -7,16 +7,15 @@
  */
 package org.opendaylight.controller.config.yangjmxgenerator.attribute;
 
-import org.opendaylight.controller.config.yangjmxgenerator.ServiceInterfaceEntry;
-import org.opendaylight.yangtools.binding.generator.util.Types;
-import org.opendaylight.yangtools.sal.binding.model.api.Type;
-import org.opendaylight.yangtools.yang.model.api.DataSchemaNode;
-
+import java.util.List;
 import javax.management.ObjectName;
 import javax.management.openmbean.ArrayType;
 import javax.management.openmbean.OpenType;
 import javax.management.openmbean.SimpleType;
-import java.util.List;
+import org.opendaylight.controller.config.yangjmxgenerator.ServiceInterfaceEntry;
+import org.opendaylight.yangtools.binding.generator.util.Types;
+import org.opendaylight.yangtools.sal.binding.model.api.Type;
+import org.opendaylight.yangtools.yang.model.api.DataSchemaNode;
 
 public class ListDependenciesAttribute extends AbstractDependencyAttribute {
 
index 9b5530175cf3e0d7165311d2d77d7f43c82681a8..8454a6bb350f6c5cc691611d24307ea4f691ccaf 100644 (file)
@@ -9,13 +9,12 @@ package org.opendaylight.controller.config.yangjmxgenerator.attribute;
 
 import com.google.common.base.Preconditions;
 import com.google.common.collect.Maps;
-import org.opendaylight.yangtools.sal.binding.model.api.Type;
-
-import javax.management.openmbean.SimpleType;
 import java.math.BigDecimal;
 import java.math.BigInteger;
 import java.util.Date;
 import java.util.Map;
+import javax.management.openmbean.SimpleType;
+import org.opendaylight.yangtools.sal.binding.model.api.Type;
 
 public class SimpleTypeResolver {
 
index e563da1328a210f82b44f498b08fd9c73348cfd3..91016d4100b6ba6e3fffe871ecbb1b7cb546d08c 100644 (file)
@@ -11,6 +11,15 @@ import com.google.common.base.Function;
 import com.google.common.collect.Collections2;
 import com.google.common.collect.Maps;
 import com.google.common.collect.Sets;
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.Map.Entry;
+import java.util.Set;
+import javax.management.openmbean.CompositeType;
+import javax.management.openmbean.OpenDataException;
+import javax.management.openmbean.OpenType;
 import org.opendaylight.controller.config.yangjmxgenerator.TypeProviderWrapper;
 import org.opendaylight.yangtools.binding.generator.util.ReferencedTypeImpl;
 import org.opendaylight.yangtools.sal.binding.model.api.Type;
@@ -22,16 +31,6 @@ import org.opendaylight.yangtools.yang.model.api.LeafListSchemaNode;
 import org.opendaylight.yangtools.yang.model.api.LeafSchemaNode;
 import org.opendaylight.yangtools.yang.model.api.ListSchemaNode;
 
-import javax.management.openmbean.CompositeType;
-import javax.management.openmbean.OpenDataException;
-import javax.management.openmbean.OpenType;
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-import java.util.Map.Entry;
-import java.util.Set;
-
 public class TOAttribute extends AbstractAttribute implements TypedAttribute {
 
     private final String nullableDescription, nullableDefault;
index e3c3a3024c8b4819b6083fd480e3831f3fbfe292..a937af9a5e8b36a3760fecd378dd20411ee1fc35 100644 (file)
@@ -7,8 +7,8 @@
  */
 package org.opendaylight.controller.config.yangjmxgenerator;
 
-import static org.junit.Assert.assertNotNull;
 import static org.hamcrest.CoreMatchers.is;
+import static org.junit.Assert.assertNotNull;
 import static org.junit.Assert.assertThat;
 
 import com.google.common.base.Preconditions;
@@ -34,8 +34,8 @@ public abstract class AbstractYangTest {
     protected Map<String, Module> namesToModules; // are module names globally
                                                   // unique?
     protected Module configModule, rpcContextModule, threadsModule,
-            threadsJavaModule, bgpListenerJavaModule, ietfInetTypesModule,
-            jmxModule, jmxImplModule, testFilesModule, testFiles1Module;
+    threadsJavaModule, bgpListenerJavaModule, ietfInetTypesModule,
+    jmxModule, jmxImplModule, testFilesModule, testFiles1Module;
 
     public static final String EVENTBUS_MXB_NAME = "eventbus";
     public static final String ASYNC_EVENTBUS_MXB_NAME = "async-eventbus";
@@ -116,7 +116,7 @@ public abstract class AbstractYangTest {
     protected Map<String /* identity local name */, ModuleMXBeanEntry> loadThreadsJava(Map<QName, ServiceInterfaceEntry> modulesToSIEs, String packageName) {
         Map<String /* identity local name */, ModuleMXBeanEntry> namesToMBEs = ModuleMXBeanEntry
                 .create(threadsJavaModule, modulesToSIEs, context, new TypeProviderWrapper(new TypeProviderImpl
-                        (context)), packageName);
+                (context)), packageName);
         Assert.assertNotNull(namesToMBEs);
         Set<String> expectedMXBeanNames = Sets.newHashSet(EVENTBUS_MXB_NAME,
                 ASYNC_EVENTBUS_MXB_NAME, THREADFACTORY_NAMING_MXB_NAME,
index cac0ac705f216cc0838e86d841b9d2e25bc2f769..65f0f54ec4cd43fcbb57a9c8928c13f2dcc45f48 100644 (file)
@@ -10,6 +10,7 @@ package org.opendaylight.controller.config.yangjmxgenerator;
 import static org.junit.Assert.assertEquals;
 import static org.junit.Assert.fail;
 
+import com.google.common.base.Preconditions;
 import java.io.File;
 import java.io.FileInputStream;
 import java.io.InputStream;
@@ -18,7 +19,6 @@ import java.util.HashMap;
 import java.util.List;
 import java.util.Map;
 import java.util.Set;
-
 import org.junit.Ignore;
 import org.junit.Test;
 import org.opendaylight.controller.config.yangjmxgenerator.plugin.util.NameConflictException;
@@ -30,11 +30,9 @@ import org.opendaylight.yangtools.yang.parser.impl.YangParserImpl;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
-import com.google.common.base.Preconditions;
-
 public class ModuleMXBeanEntryNameConflictTest extends AbstractYangTest {
 
-    private static final Logger logger = LoggerFactory
+    private static final Logger LOG = LoggerFactory
             .getLogger(ModuleMXBeanEntryNameConflictTest.class);
 
     public static final String PACKAGE_NAME = "pack2";
@@ -54,7 +52,7 @@ public class ModuleMXBeanEntryNameConflictTest extends AbstractYangTest {
             Module testedModule = loadYangs(yangFile, moduleName);
 
             try {
-                logger.debug("Testing {}", yangFile);
+                LOG.debug("Testing {}", yangFile);
                 ModuleMXBeanEntry.create(testedModule,
                         new HashMap<QName, ServiceInterfaceEntry>(), context,
                         new TypeProviderWrapper(new TypeProviderImpl(context)),
index fab273c60093b529931e5f0ce4f02f9198327ff7..17d4d9a5245297a3a54eb55bb19e7c414675e77b 100644 (file)
@@ -18,7 +18,6 @@ import static org.mockito.Mockito.doReturn;
 import static org.mockito.Mockito.mock;
 
 import com.google.common.collect.Sets;
-
 import java.net.URI;
 import java.net.URISyntaxException;
 import java.text.ParseException;
@@ -31,11 +30,9 @@ import java.util.HashSet;
 import java.util.Map;
 import java.util.Set;
 import java.util.regex.Matcher;
-
 import javax.management.openmbean.ArrayType;
 import javax.management.openmbean.CompositeType;
 import javax.management.openmbean.SimpleType;
-
 import org.junit.Before;
 import org.junit.Test;
 import org.opendaylight.controller.config.yangjmxgenerator.attribute.AttributeIfc;
index 031acfa312a0424a67b56099578e67e68e4fde60..10c42a890e9b75912bc3919a53cf02ebd409bdc3 100644 (file)
@@ -11,14 +11,12 @@ import static org.junit.Assert.assertEquals;
 import static org.mockito.Mockito.doReturn;
 import static org.mockito.Mockito.mock;
 
+import com.google.common.collect.Maps;
 import java.net.URI;
 import java.util.Map;
-
 import org.junit.Test;
 import org.opendaylight.yangtools.yang.model.api.Module;
 
-import com.google.common.collect.Maps;
-
 public class PackageTranslatorTest {
     public static final String EXPECTED_PACKAGE_PREFIX = "org.opendaylight.controller.config";
 
index 38b0a3afece740c22e897dc3d9642a594981ac04..1503b84d64a263dff2654cb13c6fb46a7ea08fa2 100644 (file)
@@ -20,9 +20,7 @@ import java.util.HashMap;
 import java.util.HashSet;
 import java.util.List;
 import java.util.Map;
-
 import javax.management.openmbean.SimpleType;
-
 import org.junit.Test;
 import org.mockito.Mockito;
 import org.opendaylight.controller.config.yangjmxgenerator.attribute.JavaAttribute;
index b72d85c11828ea26b26b781ddcc53a747e711d55..b189db4c0888319d5bdaa3f20793cad39726aee1 100644 (file)
@@ -15,20 +15,18 @@ import static org.junit.Assert.assertTrue;
 import static org.opendaylight.controller.config.yangjmxgenerator.ConfigConstants.MODULE_TYPE_Q_NAME;
 import static org.opendaylight.controller.config.yangjmxgenerator.ConfigConstants.SERVICE_TYPE_Q_NAME;
 
+import com.google.common.base.Optional;
+import com.google.common.collect.ImmutableMap;
 import java.util.Collections;
 import java.util.HashMap;
 import java.util.List;
 import java.util.Map;
-
 import org.junit.Test;
 import org.opendaylight.yangtools.yang.common.QName;
 import org.opendaylight.yangtools.yang.model.api.IdentitySchemaNode;
 import org.opendaylight.yangtools.yang.model.api.Module;
 import org.opendaylight.yangtools.yang.model.api.UnknownSchemaNode;
 
-import com.google.common.base.Optional;
-import com.google.common.collect.ImmutableMap;
-
 public class SchemaContextTest extends AbstractYangTest {
 
     IdentitySchemaNode findIdentityByQName(Module module, QName qName) {
@@ -103,14 +101,15 @@ public class SchemaContextTest extends AbstractYangTest {
         Map<String /* identity name */, Optional<QName>> expectedIdentitiesToBases = new HashMap<String, Optional<QName>>(){
             private static final long serialVersionUID = 1L;
 
-        {
-            put(ModuleMXBeanEntryTest.EVENTBUS_MXB_NAME, Optional.of(MODULE_TYPE_Q_NAME));
-            put(ModuleMXBeanEntryTest.ASYNC_EVENTBUS_MXB_NAME, Optional.of(MODULE_TYPE_Q_NAME));
-            put(ModuleMXBeanEntryTest.THREADFACTORY_NAMING_MXB_NAME, Optional.of(MODULE_TYPE_Q_NAME));
-            put(ModuleMXBeanEntryTest.THREADPOOL_DYNAMIC_MXB_NAME, Optional.of(MODULE_TYPE_Q_NAME));
-            put("thread-rpc-context", Optional.<QName>absent());
-            put(ModuleMXBeanEntryTest.THREADPOOL_REGISTRY_IMPL_NAME, Optional.of(MODULE_TYPE_Q_NAME));
-        }};
+            {
+                put(ModuleMXBeanEntryTest.EVENTBUS_MXB_NAME, Optional.of(MODULE_TYPE_Q_NAME));
+                put(ModuleMXBeanEntryTest.ASYNC_EVENTBUS_MXB_NAME, Optional.of(MODULE_TYPE_Q_NAME));
+                put(ModuleMXBeanEntryTest.THREADFACTORY_NAMING_MXB_NAME, Optional.of(MODULE_TYPE_Q_NAME));
+                put(ModuleMXBeanEntryTest.THREADPOOL_DYNAMIC_MXB_NAME, Optional.of(MODULE_TYPE_Q_NAME));
+                put("thread-rpc-context", Optional.<QName>absent());
+                put(ModuleMXBeanEntryTest.THREADPOOL_REGISTRY_IMPL_NAME, Optional.of(MODULE_TYPE_Q_NAME));
+            }
+        };
 
         assertAllIdentitiesAreExpected(threadsJavaModule,
                 expectedIdentitiesToBases);
index f22edbf948f0ba93b77346cc0b55786fcc032ab5..f021c2c81d3ece5f960ca82d6571e65180606752 100644 (file)
@@ -12,7 +12,6 @@ import static org.junit.Assert.assertNotNull;
 import static org.junit.Assert.assertThat;
 
 import com.google.common.collect.Sets;
-
 import java.net.URI;
 import java.net.URISyntaxException;
 import java.text.ParseException;
@@ -25,7 +24,6 @@ import java.util.List;
 import java.util.Map;
 import java.util.Map.Entry;
 import java.util.Set;
-
 import org.hamcrest.CoreMatchers;
 import org.junit.Test;
 import org.opendaylight.yangtools.yang.common.QName;
index 11c7d04bd7306603f07e5fe4c8a097f7686fb2e7..ce70c9a82b318f18632b09d33fca9d1ab6033d0c 100644 (file)
@@ -7,14 +7,12 @@
  */
 package org.opendaylight.controller.config.yangjmxgenerator.plugin.util;
 
+import com.google.common.base.Preconditions;
 import java.util.Collection;
 import java.util.HashMap;
 import java.util.Map;
-
 import org.opendaylight.yangtools.yang.model.api.Module;
 
-import com.google.common.base.Preconditions;
-
 public class YangModelSearchUtils {
 
     public static Map<String, Module> mapModulesByNames(
index 91e92f70e0ac437bca1bf52d7016fb87e91fd008..0bd2db8b5e0ea510dc3ff6a554be892cbf8f30b5 100644 (file)
@@ -10,10 +10,10 @@ package org.opendaylight.controller.config.yangjmxgenerator.unknownextension;
 import static org.junit.Assert.assertTrue;
 import static org.junit.Assert.fail;
 
+import com.google.common.collect.Lists;
 import java.io.InputStream;
 import java.util.List;
 import java.util.Set;
-
 import org.junit.Test;
 import org.opendaylight.controller.config.yangjmxgenerator.ConfigConstants;
 import org.opendaylight.controller.config.yangjmxgenerator.ServiceInterfaceEntryTest;
@@ -21,8 +21,6 @@ import org.opendaylight.controller.config.yangjmxgenerator.plugin.util.YangModel
 import org.opendaylight.yangtools.yang.model.api.Module;
 import org.opendaylight.yangtools.yang.parser.impl.YangParserImpl;
 
-import com.google.common.collect.Lists;
-
 public class UnknownExtensionTest extends ServiceInterfaceEntryTest {
 
     @Test