From f56f228a5c4a211228df5ff3081deb3aea45839e Mon Sep 17 00:00:00 2001 From: Robert Varga Date: Wed, 4 Nov 2015 18:30:16 +0100 Subject: [PATCH 1/1] Fix precondition string The string has been corrupted, fix it up. Change-Id: I36312ca4e5ca6365b3003a2ad57ca2734d156578 Signed-off-by: Robert Varga --- .../facade/xml/osgi/YangStoreSnapshot.java | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/opendaylight/config/config-manager-facade-xml/src/main/java/org/opendaylight/controller/config/facade/xml/osgi/YangStoreSnapshot.java b/opendaylight/config/config-manager-facade-xml/src/main/java/org/opendaylight/controller/config/facade/xml/osgi/YangStoreSnapshot.java index 8babb867b2..1c7b33fd84 100644 --- a/opendaylight/config/config-manager-facade-xml/src/main/java/org/opendaylight/controller/config/facade/xml/osgi/YangStoreSnapshot.java +++ b/opendaylight/config/config-manager-facade-xml/src/main/java/org/opendaylight/controller/config/facade/xml/osgi/YangStoreSnapshot.java @@ -148,13 +148,17 @@ final class YangStoreSnapshot implements YangStoreContext, EnumResolver { @Override public boolean equals(final Object o) { - if (this == o) return true; - if (o == null || getClass() != o.getClass()) return false; + if (this == o) { + return true; + } + if (!(o instanceof YangStoreSnapshot)) { + return false; + } final YangStoreSnapshot that = (YangStoreSnapshot) o; - - if (schemaContext != null ? !schemaContext.equals(that.schemaContext) : that.schemaContext != null) + if (schemaContext != null ? !schemaContext.equals(that.schemaContext) : that.schemaContext != null) { return false; + } return true; } @@ -177,7 +181,8 @@ final class YangStoreSnapshot implements YangStoreContext, EnumResolver { Preconditions.checkState(bindingContextProvider != null, "Binding context provider was not set yet"); final BiMap enumMapping = bindingContextProvider.getEnumMapping(enumClass); final String javaName = enumMapping.inverse().get(enumJavaValue); - return Preconditions.checkNotNull(javaName, "Unable to map enumcd .." + - "cd value %s for enum class %s with assumed enum mapping: %s", enumJavaValue, enumClass, enumMapping.inverse()); + return Preconditions.checkNotNull(javaName, + "Unable to map enum value %s for enum class %s with assumed enum mapping: %s", enumJavaValue, enumClass, + enumMapping.inverse()); } } -- 2.36.6