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

commit dcc771b2ad21bea0caecaef79cf26daaa8ecc229 fix reference comparison
of Boolean values.
I GWT debugging we are getting NPE because the new comparison of
consoleAddressPartiallyOverridden null value to false, hence not setting
it to false.

This patch add default value to false and change the
isConsoleAddressPartiallyOverridden() to return false instead of null

Change-Id: I81405b5484dcfcaa4e7f90279e076cad5f085581
Signed-off-by: Shahar Havivi <shav...@redhat.com>
---
M 
frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/clusters/ClusterGeneralModel.java
1 file changed, 3 insertions(+), 3 deletions(-)


  git pull ssh://gerrit.ovirt.org:29418/ovirt-engine refs/changes/90/15790/1

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 70ec7c1..6492d93 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
@@ -38,7 +38,7 @@
     private Integer noOfVolumesDown;
 
     // set to true, if some hosts in the cluster has the console address 
overridden and some not
-    private Boolean consoleAddressPartiallyOverridden;
+    private Boolean consoleAddressPartiallyOverridden = Boolean.FALSE;
 
     public String getNoOfVolumesTotal() {
         return Integer.toString(noOfVolumesTotal);
@@ -131,7 +131,7 @@
     private ClusterType clusterType;
 
     public void setConsoleAddressPartiallyOverridden(Boolean 
consoleAddressPartiallyOverridden) {
-        if ((this.consoleAddressPartiallyOverridden == null ? false : 
this.consoleAddressPartiallyOverridden.booleanValue()) !=
+        if (isConsoleAddressPartiallyOverridden().booleanValue() !=
             (consoleAddressPartiallyOverridden == null ? false : 
consoleAddressPartiallyOverridden.booleanValue())) {
             this.consoleAddressPartiallyOverridden = 
consoleAddressPartiallyOverridden;
             onPropertyChanged(new 
PropertyChangedEventArgs("consoleAddressPartiallyOverridden")); //$NON-NLS-1$
@@ -139,7 +139,7 @@
     }
 
     public Boolean isConsoleAddressPartiallyOverridden() {
-        return consoleAddressPartiallyOverridden;
+        return consoleAddressPartiallyOverridden == null ? Boolean.FALSE : 
consoleAddressPartiallyOverridden;
     }
 
     @Override


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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I81405b5484dcfcaa4e7f90279e076cad5f085581
Gerrit-PatchSet: 1
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Shahar Havivi <shav...@redhat.com>
_______________________________________________
Engine-patches mailing list
Engine-patches@ovirt.org
http://lists.ovirt.org/mailman/listinfo/engine-patches

Reply via email to