String performance and maintenability
[controller.git] / opendaylight / md-sal / sal-distributed-datastore / src / main / java / org / opendaylight / controller / cluster / datastore / identifiers / ShardManagerIdentifier.java
index 65bf010b0adcb7e637110691584c0e263064f668..880ba99dbd6f1dcf1be16abd106b1d0dfb37d530 100644 (file)
@@ -16,15 +16,15 @@ public class ShardManagerIdentifier {
     }
 
     @Override
-    public boolean equals(Object o) {
-        if (this == o) {
+    public boolean equals(Object obj) {
+        if (this == obj) {
             return true;
         }
-        if (o == null || getClass() != o.getClass()) {
+        if (obj == null || getClass() != obj.getClass()) {
             return false;
         }
 
-        ShardManagerIdentifier that = (ShardManagerIdentifier) o;
+        ShardManagerIdentifier that = (ShardManagerIdentifier) obj;
 
         if (!type.equals(that.type)) {
             return false;
@@ -39,24 +39,22 @@ public class ShardManagerIdentifier {
     }
 
     @Override public String toString() {
-        StringBuilder builder = new StringBuilder();
-        builder.append("shardmanager-").append(type);
-        return builder.toString();
+        return "shardmanager-" + type;
     }
 
-    public static Builder builder(){
+    public static Builder builder() {
         return new Builder();
     }
 
     public static class Builder {
         private String type;
 
-        public Builder type(String type){
-            this.type = type;
+        public Builder type(String newType) {
+            this.type = newType;
             return this;
         }
 
-        public ShardManagerIdentifier build(){
+        public ShardManagerIdentifier build() {
             return new ShardManagerIdentifier(this.type);
         }