Lior Vernia has posted comments on this change.

Change subject: webadmin: clean properties when changing the cluster policy
......................................................................


Patch Set 2:

(1 comment)

http://gerrit.ovirt.org/#/c/25093/2/frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/vms/key_value/KeyValueModel.java
File 
frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/vms/key_value/KeyValueModel.java:

Line 57:             saveEntity = value;
Line 58:             return;
Line 59:         }
Line 60: 
Line 61:         if (value != null) {
It doesn't look to me like the behavior should be different for null and for an 
empty string; don't you need to reset the map even if value is null? In which 
case, you can drop this check and add it to the if below (i.e. value != null && 
!value.isEmpty()).
Line 62:             //always reset the list of items when the item changes
Line 63:             keyValueMap_used = new HashMap<String, String>();
Line 64:             if (!value.isEmpty()) {
Line 65:                 String[] lines = value.split(PROPERTIES_DELIMETER);


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

Gerrit-MessageType: comment
Gerrit-Change-Id: Icb1da2c3d97c63ce6b73cfb3fd68ee7fb05e8ebb
Gerrit-PatchSet: 2
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Jiří Moskovčák <jmosk...@redhat.com>
Gerrit-Reviewer: Artyom Lukianov <aluki...@redhat.com>
Gerrit-Reviewer: Doron Fediuck <dfedi...@redhat.com>
Gerrit-Reviewer: Gilad Chaplik <gchap...@redhat.com>
Gerrit-Reviewer: Jiří Moskovčák <jmosk...@redhat.com>
Gerrit-Reviewer: Kobi Ianko <k...@redhat.com>
Gerrit-Reviewer: Lior Vernia <lver...@redhat.com>
Gerrit-Reviewer: Martin Sivák <msi...@redhat.com>
Gerrit-Reviewer: Vojtech Szocs <vsz...@redhat.com>
Gerrit-Reviewer: automat...@ovirt.org
Gerrit-Reviewer: oVirt Jenkins CI Server
Gerrit-HasComments: Yes
_______________________________________________
Engine-patches mailing list
Engine-patches@ovirt.org
http://lists.ovirt.org/mailman/listinfo/engine-patches

Reply via email to