Shahar Havivi has uploaded a new change for review.

Change subject: findbugs: Suspicious reference comparison of Boolean values
......................................................................

findbugs: Suspicious reference comparison of Boolean values

RC: Suspicious reference comparison of Boolean values 
(RC_REF_COMPARISON_BAD_PRACTICE_BOOLEAN)

Change-Id: I210767bb1e273caa421bf3da1b1608a7facb6621
Signed-off-by: Shahar Havivi <[email protected]>
---
M 
backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/businessentities/VmDevice.java
M 
frontend/webadmin/modules/gwt-common/src/main/java/org/ovirt/engine/ui/common/widget/table/column/RadioboxCell.java
M 
frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/clusters/ClusterGeneralModel.java
3 files changed, 5 insertions(+), 3 deletions(-)


  git pull ssh://gerrit.ovirt.org:29418/ovirt-engine refs/changes/25/15325/1

diff --git 
a/backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/businessentities/VmDevice.java
 
b/backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/businessentities/VmDevice.java
index c687ead..1c297fb 100644
--- 
a/backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/businessentities/VmDevice.java
+++ 
b/backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/businessentities/VmDevice.java
@@ -233,7 +233,7 @@
                 && bootOrder == other.bootOrder
                 && ObjectUtils.objectsEqual(specParams, other.specParams)
                 && isManaged == other.isManaged
-                && isPlugged == other.isPlugged
+                && (isPlugged == null ? false : isPlugged.booleanValue()) == 
(other.isPlugged == null ? false : other.isPlugged.booleanValue())
                 && isReadOnly == other.isReadOnly
                 && alias.equals(other.alias));
     }
diff --git 
a/frontend/webadmin/modules/gwt-common/src/main/java/org/ovirt/engine/ui/common/widget/table/column/RadioboxCell.java
 
b/frontend/webadmin/modules/gwt-common/src/main/java/org/ovirt/engine/ui/common/widget/table/column/RadioboxCell.java
index a01b635..d3891a2 100644
--- 
a/frontend/webadmin/modules/gwt-common/src/main/java/org/ovirt/engine/ui/common/widget/table/column/RadioboxCell.java
+++ 
b/frontend/webadmin/modules/gwt-common/src/main/java/org/ovirt/engine/ui/common/widget/table/column/RadioboxCell.java
@@ -106,7 +106,8 @@
              * Save the new value. However, if the cell depends on the 
selection, then do not save the value because we
              * can get into an inconsistent state.
              */
-            if (value != isChecked && !dependsOnSelection()) {
+            if ((value == null ? false : value.booleanValue()) !=
+                (isChecked == null ? false : isChecked.booleanValue()) && 
!dependsOnSelection()) {
                 setViewData(context.getKey(), isChecked);
             } else {
                 clearViewData(context.getKey());
diff --git 
a/frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/clusters/ClusterGeneralModel.java
 
b/frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/clusters/ClusterGeneralModel.java
index 5a4c858..70ec7c1 100644
--- 
a/frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/clusters/ClusterGeneralModel.java
+++ 
b/frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/clusters/ClusterGeneralModel.java
@@ -131,7 +131,8 @@
     private ClusterType clusterType;
 
     public void setConsoleAddressPartiallyOverridden(Boolean 
consoleAddressPartiallyOverridden) {
-        if (this.consoleAddressPartiallyOverridden != 
consoleAddressPartiallyOverridden) {
+        if ((this.consoleAddressPartiallyOverridden == null ? false : 
this.consoleAddressPartiallyOverridden.booleanValue()) !=
+            (consoleAddressPartiallyOverridden == null ? false : 
consoleAddressPartiallyOverridden.booleanValue())) {
             this.consoleAddressPartiallyOverridden = 
consoleAddressPartiallyOverridden;
             onPropertyChanged(new 
PropertyChangedEventArgs("consoleAddressPartiallyOverridden")); //$NON-NLS-1$
         }


--
To view, visit http://gerrit.ovirt.org/15325
To unsubscribe, visit http://gerrit.ovirt.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I210767bb1e273caa421bf3da1b1608a7facb6621
Gerrit-PatchSet: 1
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Shahar Havivi <[email protected]>
_______________________________________________
Engine-patches mailing list
[email protected]
http://lists.ovirt.org/mailman/listinfo/engine-patches

Reply via email to