mooli tayer has uploaded a new change for review. Change subject: utils: do defensive copying before returning config values. ......................................................................
utils: do defensive copying before returning config values. Without copying users can unexpectedly change internal values after calling getProperties(). Change-Id: I33c5e05b5e433634575285e19b435127dd0ae968 Signed-off-by: Mooli Tayer <mta...@redhat.com> --- M backend/manager/modules/uutils/src/main/java/org/ovirt/engine/core/uutils/config/ShellLikeConfd.java 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.ovirt.org:29418/ovirt-engine refs/changes/26/27526/1 diff --git a/backend/manager/modules/uutils/src/main/java/org/ovirt/engine/core/uutils/config/ShellLikeConfd.java b/backend/manager/modules/uutils/src/main/java/org/ovirt/engine/core/uutils/config/ShellLikeConfd.java index f63b963..549b0ec 100644 --- a/backend/manager/modules/uutils/src/main/java/org/ovirt/engine/core/uutils/config/ShellLikeConfd.java +++ b/backend/manager/modules/uutils/src/main/java/org/ovirt/engine/core/uutils/config/ShellLikeConfd.java @@ -280,7 +280,7 @@ * @return map of all properties. */ public Map<String, String> getProperties() { - return values; + return new HashMap<>(values); } /** -- To view, visit http://gerrit.ovirt.org/27526 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I33c5e05b5e433634575285e19b435127dd0ae968 Gerrit-PatchSet: 1 Gerrit-Project: ovirt-engine Gerrit-Branch: master Gerrit-Owner: mooli tayer <mta...@redhat.com> _______________________________________________ Engine-patches mailing list Engine-patches@ovirt.org http://lists.ovirt.org/mailman/listinfo/engine-patches