[pi-code-cleaning] Possible unintentional assignations warnings fixed
authorNaroa Iriarte <naroa.iriarte@openbravo.com>
Thu, 28 Apr 2016 12:54:39 +0200
changeset 29526 f0da01713483
parent 29525 edc77c7c500a
child 29527 69cad195ca3c
[pi-code-cleaning] Possible unintentional assignations warnings fixed

There were two assignations inside an if condition, this rised a warning.
To fix this, the value of the variable is previously assigned and it is
not done inside the if condition. The if condition now only checks if the
value of the parameter is true or false.
src/org/openbravo/erpCommon/ad_forms/ModuleManagement.java
--- a/src/org/openbravo/erpCommon/ad_forms/ModuleManagement.java	Thu Apr 28 12:20:43 2016 +0200
+++ b/src/org/openbravo/erpCommon/ad_forms/ModuleManagement.java	Thu Apr 28 12:54:39 2016 +0200
@@ -2026,13 +2026,15 @@
     boolean found = false;
     String agreement = "";
     while (!found && inst != null && i < inst.length) {
-      if (found = inst[i].getModuleID().equals(record))
+      found = inst[i].getModuleID().equals(record);
+      if (found)
         agreement = inst[i].getLicenseAgreement();
       i++;
     }
     i = 0;
     while (!found && upd != null && i < upd.length) {
-      if (found = upd[i].getModuleID().equals(record))
+      found = upd[i].getModuleID().equals(record);
+      if (found)
         agreement = upd[i].getLicenseAgreement();
       i++;
     }