Fixed Group and meter id bugs
[controller.git] / opendaylight / forwardingrulesmanager / api / src / main / java / org / opendaylight / controller / forwardingrulesmanager / FlowConfig.java
index e0b8e9a786878fe6af6b67dd04aeee52958118db..43b0252df7b5c8aa83df94866632887286b44252 100644 (file)
@@ -188,13 +188,13 @@ public class FlowConfig implements Serializable {
     public boolean installInHw() {
         if (installInHw == null) {
             // backward compatibility
-            installInHw = "true";
+            installInHw = Boolean.toString(true);
         }
-        return installInHw.equals("true");
+        return Boolean.valueOf(installInHw);
     }
 
     public void setInstallInHw(boolean inHw) {
-        installInHw = inHw ? "true" : "false";
+        installInHw = String.valueOf(inHw);
     }
 
     public String getInstallInHw() {
@@ -861,6 +861,9 @@ public class FlowConfig implements Serializable {
                                     return new Status(StatusCode.BADREQUEST, msg);
                                 }
                             }
+                        } else {
+                            String msg = String.format("Output port %s is not valid", t);
+                            return new Status(StatusCode.BADREQUEST, msg);
                         }
                     }
                     continue;
@@ -1072,7 +1075,7 @@ public class FlowConfig implements Serializable {
     }
 
     public void toggleInstallation() {
-        installInHw = (installInHw == null) ? "true" : (installInHw.equals("true")) ? "false" : "true";
+        installInHw = (installInHw == null) ? Boolean.toString(false) : Boolean.toString(!Boolean.valueOf(installInHw));
     }
 
     /*