Merge "Simple changes to eliminate pmd warnings"
authorGiovanni Meo <gmeo@cisco.com>
Thu, 19 Sep 2013 08:58:20 +0000 (08:58 +0000)
committerGerrit Code Review <gerrit@opendaylight.org>
Thu, 19 Sep 2013 08:58:20 +0000 (08:58 +0000)
opendaylight/sal/api/src/main/java/org/opendaylight/controller/sal/authorization/AppRoleLevel.java
opendaylight/sal/api/src/main/java/org/opendaylight/controller/sal/core/Node.java
opendaylight/sal/api/src/main/java/org/opendaylight/controller/sal/core/NodeConnector.java
opendaylight/sal/api/src/main/java/org/opendaylight/controller/sal/core/NodeTable.java

index 7e73dd414f4e18dd927b3085b074bd02af56f762..124b495147db61d99b53b24138bf47e5dda4083c 100644 (file)
@@ -45,9 +45,9 @@ public enum AppRoleLevel implements Serializable {
     }
 
     public static AppRoleLevel fromString(String levelString) {
-        for (AppRoleLevel level : AppRoleLevel.values()) {
-                if (level.toString().equals(levelString)) {
-                        return level;
+        for (AppRoleLevel rolelevel : AppRoleLevel.values()) {
+                if (rolelevel.toString().equals(levelString)) {
+                        return rolelevel;
                 }
         }
         return null;
index d21a147506dfd8e2f546ddd5210df33b1fc29c20..0ea04c32065e7746518504901abc454f4d5e6281 100644 (file)
@@ -323,10 +323,10 @@ public class Node implements Serializable {
     @Override
     public String toString() {
         if (this.nodeType.equals(NodeIDType.OPENFLOW)) {
-            return this.nodeType.toString() + "|"
+            return this.nodeType + "|"
                 + HexEncode.longToHexString((Long) this.nodeID);
         } else {
-            return this.nodeType.toString() + "|" + this.nodeID.toString();
+            return this.nodeType + "|" + this.nodeID.toString();
         }
     }
 
index 50ccf69b4090ad220aebb5b97b35559f978efd56..46c5a9dae933baee49c47e98476a37dd9222dae5 100644 (file)
@@ -464,9 +464,9 @@ public class NodeConnector implements Serializable {
             .equals(NodeConnectorIDType.SWSTACK) ||
             this.nodeConnectorType
             .equals(NodeConnectorIDType.HWPATH)) {
-            return this.nodeConnectorType.toString();
+            return this.nodeConnectorType;
         } else {
-            return this.nodeConnectorType.toString() + "|"
+            return this.nodeConnectorType + "|"
                     + this.nodeConnectorID.toString();
         }
     }
index 7b7f1ccaeaf22f29dc4fa2a9c35b75854086b46f..9e763eb241a273375edf7c27a6ed40871a9b0a0a 100644 (file)
@@ -292,7 +292,7 @@ public class NodeTable implements Serializable {
     }
 
     public String getNodeTableIdAsString() {
-        return this.nodeTableType.toString() + "|"
+        return this.nodeTableType + "|"
                 + this.nodeTableID.toString();
     }