From e4379dab63a7f9ca1fe4e818416efcfdaeab9e55 Mon Sep 17 00:00:00 2001 From: Robert Varga Date: Mon, 12 Jan 2015 12:58:03 +0100 Subject: [PATCH] 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 --- .../config/yangjmxgenerator/ModuleMXBeanEntryBuilder.java | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) 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; -- 2.36.6