Allon Mureinik has posted comments on this change. Change subject: engine: search cleanup (1/N) ......................................................................
Patch Set 1: I would prefer that you didn't submit this (2 inline comments) Why are you doing this change only for AdSearchObjecAutoCompleter and not for the rest of the classes that extend BaseAutoCompleter? .................................................... File backend/manager/modules/searchbackend/src/main/java/org/ovirt/engine/core/searchbackend/BaseAutoCompleter.java Line 16: Line 17: } Line 18: Line 19: public BaseAutoCompleter(String text) { Line 20: mVerbs.put(text, text); This should also use acceptAll instead of called mVerbs.put directly Line 21: buildCompletions(); Line 22: } Line 23: Line 24: public BaseAutoCompleter(String[] text) { Line 30: this(text); Line 31: acceptAll(noAutocomplete); Line 32: } Line 33: Line 34: protected final void acceptAll(final String[] tokens) { If you use String... instead of String[], you can avoid calling new String[]{} in the subclasses an in the single string constructor Line 35: for (String token : tokens) { Line 36: mVerbs.put(token, token); Line 37: } Line 38: } -- To view, visit http://gerrit.ovirt.org/14404 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Id9ed66b776b82ab68f550833d9e5549776b9562d Gerrit-PatchSet: 1 Gerrit-Project: ovirt-engine Gerrit-Branch: master Gerrit-Owner: Laszlo Hornyak <lhorn...@redhat.com> Gerrit-Reviewer: Allon Mureinik <amure...@redhat.com> Gerrit-Reviewer: Laszlo Hornyak <lhorn...@redhat.com> Gerrit-Reviewer: Yair Zaslavsky <yzasl...@redhat.com> _______________________________________________ Engine-patches mailing list Engine-patches@ovirt.org http://lists.ovirt.org/mailman/listinfo/engine-patches