Change in ovirt-engine[master]: engine: Time zones not ordered well (#850696)

tjelinek at redhat.com tjelinek at redhat.com
Thu Aug 23 08:30:02 UTC 2012


Tomas Jelinek has submitted this change and it was merged.

Change subject: engine: Time zones not ordered well (#850696)
......................................................................


engine: Time zones not ordered well (#850696)

https://bugzilla.redhat.com/850696

WebAdmin -> Virtual Machines tab -> new server/desktop ->
Initial Run -> Time Zone
The content of this check box is not ordered well if the
selected VM operating system is windows.

The problem was in GetTimeZonesQuery which had the
TimeZoneTimeExtractComperator not correctly implemented:
The compare method returned only 0 and 1, but never -1,
even when the second arg was smaller than the first one.

This worked in JDK6, but the JDK7's Collections.sort()
checks if the comparator is implemented correctly, and
if not, it does not sort the list at all.

Fixed by fixing the compare method to work according to
the contract.

Change-Id: Iecae3f868d6b3bc6663459367d1bd424b920a3fb
Signed-off-by: Tomas Jelinek <tjelinek at redhat.com>
---
M backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/GetTimeZonesQuery.java
1 file changed, 6 insertions(+), 1 deletion(-)

Approvals:
  Tomas Jelinek: Verified; Looks good to me, approved


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

Gerrit-MessageType: merged
Gerrit-Change-Id: Iecae3f868d6b3bc6663459367d1bd424b920a3fb
Gerrit-PatchSet: 2
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Tomas Jelinek <tjelinek at redhat.com>
Gerrit-Reviewer: Omer Frenkel <ofrenkel at redhat.com>
Gerrit-Reviewer: Tomas Jelinek <tjelinek at redhat.com>
Gerrit-Reviewer: oVirt Jenkins CI Server



More information about the Engine-commits mailing list