BUG-3823 : fixed Sonar issues for PCEP/programming
[bgpcep.git] / pcep / spi / src / main / java / org / opendaylight / protocol / pcep / spi / PCEPErrorIdentifier.java
index cd573fca94d19317c82fb02af5e9b0458b13dd71..df8152eb732635bd49208ff501f90a6d3a034ae6 100644 (file)
@@ -44,17 +44,11 @@ final class PCEPErrorIdentifier implements Serializable {
         if (this == obj) {
             return true;
         }
-        if (obj == null) {
-            return false;
-        }
-        if (this.getClass() != obj.getClass()) {
+        if (obj == null || this.getClass() != obj.getClass()) {
             return false;
         }
         final PCEPErrorIdentifier other = (PCEPErrorIdentifier) obj;
-        if (this.type != other.type) {
-            return false;
-        }
-        if (this.value != other.value) {
+        if (this.type != other.type || this.value != other.value) {
             return false;
         }
         return true;