Tal Nisan has submitted this change and it was merged. Change subject: core: sorted getJsonDiskDescription() ......................................................................
core: sorted getJsonDiskDescription() ImagesHandler.getJsonDiskDescription() used a HashMap to serialize a Disk's Alias and Description. Since the order of iteration of a HashMap cannot be trusted, it made the method's behavior unpredictable in different environments, specifically breaking the unit tests on the default JDK8 supplied with Fedora 21. This patch replaces the internal implementation from using a HashMap to use a TreeMap, ensuring the keys are iterated by order, and thus producing a reliable output: {"DiskAlias":"some_alias","DiskDescription":"some_description}. The unit tests have been fixed accordingly, making them agnostic to JDK upgrades. Change-Id: Ic8496858a2cb5715ab9f84b8ae77f62b3e6097d4 Bug-Url: https://bugzilla.redhat.com/1180887 Signed-off-by: Allon Mureinik <amure...@redhat.com> --- M backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/ImagesHandler.java M backend/manager/modules/bll/src/test/java/org/ovirt/engine/core/bll/ImagesHandlerTest.java 2 files changed, 5 insertions(+), 4 deletions(-) Approvals: Tal Nisan: Looks good to me, approved Allon Mureinik: Verified -- To view, visit http://gerrit.ovirt.org/36762 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ic8496858a2cb5715ab9f84b8ae77f62b3e6097d4 Gerrit-PatchSet: 1 Gerrit-Project: ovirt-engine Gerrit-Branch: ovirt-engine-3.5 Gerrit-Owner: Allon Mureinik <amure...@redhat.com> Gerrit-Reviewer: Allon Mureinik <amure...@redhat.com> Gerrit-Reviewer: Tal Nisan <tni...@redhat.com> Gerrit-Reviewer: automat...@ovirt.org _______________________________________________ Engine-patches mailing list Engine-patches@ovirt.org http://lists.ovirt.org/mailman/listinfo/engine-patches