Lior Vernia has uploaded a new change for review.

Change subject: webadmin: Changed by reference check to by value (findbugs)
......................................................................

webadmin: Changed by reference check to by value (findbugs)

When setting a model's change prohibition reason, the check whether
the value is different than the preceding value, in order to see if an
event has to be raised, was being done by reference rather than by
value. It doesn't really matter because all strings passed to the
method are constants, but the norm with triggering value change events
is to check by value.

Change-Id: Ibca529d23718dfaa5bf120d0bc157c259f016911
Signed-off-by: Lior Vernia <lver...@redhat.com>
---
M 
frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/Model.java
1 file changed, 1 insertion(+), 1 deletion(-)


  git pull ssh://gerrit.ovirt.org:29418/ovirt-engine refs/changes/91/21091/1

diff --git 
a/frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/Model.java
 
b/frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/Model.java
index f9b26f3..980186f 100644
--- 
a/frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/Model.java
+++ 
b/frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/Model.java
@@ -297,7 +297,7 @@
 
     public void setChangeProhibitionReason(String value)
     {
-        if (privateChangeProhibitionReason != value) {
+        if (!StringHelper.stringsEqual(privateChangeProhibitionReason, value)) 
{
             privateChangeProhibitionReason = value;
             onPropertyChanged(new 
PropertyChangedEventArgs("ChangeProhibitionReason")); //$NON-NLS-1$
         }


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

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

Reply via email to