Merge "Remove dead code"
authorTony Tkacik <ttkacik@cisco.com>
Fri, 16 Jan 2015 12:05:59 +0000 (12:05 +0000)
committerGerrit Code Review <gerrit@opendaylight.org>
Fri, 16 Jan 2015 12:06:00 +0000 (12:06 +0000)
opendaylight/config/yang-jmx-generator/src/main/java/org/opendaylight/controller/config/yangjmxgenerator/ModuleMXBeanEntryBuilder.java

index 2ab60e8c878138e89c1688c4a23678622b66487a..0199e8cd1792a6d714d4968796b1ed4eca45811c 100644 (file)
@@ -249,15 +249,10 @@ final class ModuleMXBeanEntryBuilder {
         String moduleLocalNameFromXPath = matcher.group(1);
         IdentitySchemaNode moduleIdentity = moduleIdentities.get(moduleLocalNameFromXPath);
         unaugmentedModuleIdentities.remove(moduleLocalNameFromXPath);
-        checkState(moduleIdentity != null, "Cannot find identity " + moduleLocalNameFromXPath
-                + " matching augmentation " + augmentation);
+        checkState(moduleIdentity != null, "Cannot find identity %s matching augmentation %s", moduleLocalNameFromXPath, augmentation);
         Map<String, QName> providedServices = findProvidedServices(moduleIdentity, currentModule, qNamesToSIEs,
                 schemaContext);
 
-        if (moduleIdentity == null) {
-            throw new IllegalStateException("Cannot find identity specified by augmentation xpath constraint: "
-                    + moduleLocalNameFromXPath + " of " + augmentation);
-        }
         String javaNamePrefix = TypeProviderWrapper.findJavaNamePrefix(moduleIdentity);
 
         Map<String, AttributeIfc> yangToAttributes = null;