Cleanup equals() template 45/49445/2
authorRobert Varga <rovarga@cisco.com>
Thu, 15 Dec 2016 17:22:00 +0000 (18:22 +0100)
committerTom Pantelis <tpanteli@brocade.com>
Fri, 16 Dec 2016 14:28:04 +0000 (14:28 +0000)
Missing a space in 'if(' and has explicit comparison to false,
which is not needed. Clean that up.

Change-Id: I55f748935070378eab58dd11cf2fb91e8cc9628b
Signed-off-by: Robert Varga <rovarga@cisco.com>
opendaylight/config/yang-jmx-generator-plugin/src/main/java/org/opendaylight/controller/config/yangjmxgenerator/plugin/ftl/TemplateFactory.java

index 6e1f54e..294520b 100644 (file)
@@ -439,7 +439,7 @@ public class TemplateFactory {
                         "        final %s that = (%s) o;\n", name, name));
                 for (AttributeIfc s : attrs.values()) {
                     equalsBodyBuilder.append(String.format(
-                            "        if(java.util.Objects.equals(%1$s, that.%1$s) == false) {\n" +
+                            "        if (!java.util.Objects.equals(%1$s, that.%1$s)) {\n" +
                             "            return false;\n" +
                             "        }\n\n", s.getLowerCaseCammelCase()));
                 }