Fixup Sonar issues
[controller.git] / opendaylight / md-sal / sal-distributed-datastore / src / main / java / org / opendaylight / controller / cluster / datastore / identifiers / ShardIdentifier.java
index 7c206adc5859cc5117894ee72eb6e5bb1f62db9a..74d100540a1f807807db62578a1ab3f397b269e2 100644 (file)
@@ -52,19 +52,8 @@ public class ShardIdentifier {
             return false;
         }
 
-        ShardIdentifier that = (ShardIdentifier) obj;
-
-        if (!memberName.equals(that.memberName)) {
-            return false;
-        }
-        if (!shardName.equals(that.shardName)) {
-            return false;
-        }
-        if (!type.equals(that.type)) {
-            return false;
-        }
-
-        return true;
+        final var that = (ShardIdentifier) obj;
+        return memberName.equals(that.memberName) && shardName.equals(that.shardName) && type.equals(that.type);
     }
 
     @Override
@@ -103,17 +92,17 @@ public class ShardIdentifier {
         }
 
         public Builder shardName(final String newShardName) {
-            this.shardName = newShardName;
+            shardName = newShardName;
             return this;
         }
 
         public Builder memberName(final MemberName newMemberName) {
-            this.memberName = newMemberName;
+            memberName = newMemberName;
             return this;
         }
 
         public Builder type(final String newType) {
-            this.type = newType;
+            type = newType;
             return this;
         }