From: Robert Varga Date: Mon, 12 Jan 2015 11:58:03 +0000 (+0100) Subject: Remove dead code X-Git-Tag: release/lithium~699^2 X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?a=commitdiff_plain;h=e4379dab63a7f9ca1fe4e818416efcfdaeab9e55;p=controller.git Remove dead code The moduleIdentity reference is checked for non-null in a preceding condition, so the entire branch is provably dead. Also removes string concatenation. Change-Id: I8c2ad967af53a5216359677b8d7e3975294c942b Signed-off-by: Robert Varga --- diff --git a/opendaylight/config/yang-jmx-generator/src/main/java/org/opendaylight/controller/config/yangjmxgenerator/ModuleMXBeanEntryBuilder.java b/opendaylight/config/yang-jmx-generator/src/main/java/org/opendaylight/controller/config/yangjmxgenerator/ModuleMXBeanEntryBuilder.java index 2ab60e8c87..0199e8cd17 100644 --- a/opendaylight/config/yang-jmx-generator/src/main/java/org/opendaylight/controller/config/yangjmxgenerator/ModuleMXBeanEntryBuilder.java +++ b/opendaylight/config/yang-jmx-generator/src/main/java/org/opendaylight/controller/config/yangjmxgenerator/ModuleMXBeanEntryBuilder.java @@ -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 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 yangToAttributes = null;