Juan Hernandez has posted comments on this change. Change subject: core: Adds cli parsers with POSIX and GNU long args ......................................................................
Patch Set 1: Code-Review+1 (2 comments) I think we should support spaces as option/value separator as well. .................................................... File backend/manager/modules/utils/src/main/java/org/ovirt/engine/core/utils/cli/ExtendedCliParser.java Line 93: * Line 94: * @param arg Line 95: * argument Line 96: * @param value Line 97: * {@code true} if argument may contain value, otherwise {@code false} There is no "value" parameter. Line 98: * @return {@code true} if string contains valid GNU long argument, otherwise {@code false} Line 99: */ Line 100: private boolean isGnuLongArg(String arg) { Line 101: boolean result = true; Line 105: result = false; Line 106: } else { Line 107: for (int i = 2; i < arg.length(); i++) { Line 108: if (i > 2 && i + 2 < arg.length() && GNU_LONG_VALUE_SEP.equals(arg.substring(i, i + 1))) { Line 109: // argument contains value GNU long options support space and = as separator, but if I understand correctly this only accepts =. Line 110: break; Line 111: } Line 112: char c = arg.charAt(i); Line 113: if (!Character.isLetterOrDigit(c) && c != '-') { -- To view, visit http://gerrit.ovirt.org/19128 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: If0dd854826433b577b902eaba6b4fcd8967d1199 Gerrit-PatchSet: 1 Gerrit-Project: ovirt-engine Gerrit-Branch: master Gerrit-Owner: Martin Peřina <mper...@redhat.com> Gerrit-Reviewer: Alon Bar-Lev <alo...@redhat.com> Gerrit-Reviewer: Barak Azulay <bazu...@redhat.com> Gerrit-Reviewer: Juan Hernandez <juan.hernan...@redhat.com> Gerrit-Reviewer: Martin Peřina <mper...@redhat.com> Gerrit-Reviewer: Roy Golan <rgo...@redhat.com> Gerrit-Reviewer: Yair Zaslavsky <yzasl...@redhat.com> 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