Omer Frenkel has posted comments on this change. Change subject: engine : Introduce TimeConverter ......................................................................
Patch Set 17: (2 comments) http://gerrit.ovirt.org/#/c/27469/17/backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/utils/TimeConverter.java File backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/utils/TimeConverter.java: Line 9: public class TimeConverter { Line 10: Line 11: private static List<TimeUnit> orderedTimeUnits; Line 12: Line 13: private static void init() { this should be static initialization block (instead of static init method) so it will happen only once Line 14: orderedTimeUnits = new ArrayList<TimeUnit>(); Line 15: for(TimeUnit timeUnit : TimeUnit.values()) { Line 16: orderedTimeUnits.add(timeUnit); Line 17: } Line 25: } Line 26: })); Line 27: } Line 28: Line 29: public static long convert(long interval, TimeUnit fromUnit, TimeUnit toUnit) { can you please add short doc for the public methods? what is the input/output of each Line 30: return TimeUnit.valueOf(toUnit.name()).convert(interval, fromUnit); Line 31: } Line 32: Line 33: public static Pair<Long, TimeUnit> autoConvert(long interval, TimeUnit fromUnit) { -- To view, visit http://gerrit.ovirt.org/27469 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I045aaa4f93b345e0457e1a0ce2ccf0ceeb9071ad Gerrit-PatchSet: 17 Gerrit-Project: ovirt-engine Gerrit-Branch: master Gerrit-Owner: anmolbabu <anb...@redhat.com> Gerrit-Reviewer: Kanagaraj M <kmayi...@redhat.com> Gerrit-Reviewer: Omer Frenkel <ofren...@redhat.com> Gerrit-Reviewer: Ramesh N <rnach...@redhat.com> Gerrit-Reviewer: Sahina Bose <sab...@redhat.com> Gerrit-Reviewer: Shubhendu Tripathi <shtri...@redhat.com> Gerrit-Reviewer: anmolbabu <anb...@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