Vojtech Szocs has posted comments on this change. Change subject: webadmin: removed caching from EnumTranslator. ......................................................................
Patch Set 3: (1 comment) The patch looks good to me, just a few comments in Translator.java http://gerrit.ovirt.org/#/c/26048/3/frontend/webadmin/modules/uicompat/src/main/java/org/ovirt/engine/ui/uicompat/Translator.java File frontend/webadmin/modules/uicompat/src/main/java/org/ovirt/engine/ui/uicompat/Translator.java: Line 2: Line 3: Line 4: public class Translator<T> { Line 5: Line 6: public String get(T key) { Hm, I see that EnumTranslator overrides get method without calling super. At the same time, all user code accesses Translator via EnumTranslator. I think it would make sense to make Translator an interface that defines contract for get and containsKey methods, and EnumTranslator would simply implement that interface. On a side note, I think that "translate" would be better than "get" for the method name, but this is out of scope for this patch. Line 7: if(key == null) { Line 8: return null; Line 9: } Line 10: return key.toString(); -- To view, visit http://gerrit.ovirt.org/26048 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I3df424d8e7a35ed249b2760da79deba7db31b785 Gerrit-PatchSet: 3 Gerrit-Project: ovirt-engine Gerrit-Branch: master Gerrit-Owner: Martin Mucha <mmu...@redhat.com> Gerrit-Reviewer: Alona Kaplan <alkap...@redhat.com> Gerrit-Reviewer: Lior Vernia <lver...@redhat.com> Gerrit-Reviewer: Martin Mucha <mmu...@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