Martin Peřina has posted comments on this change. Change subject: aaa: utils: command line fixes ......................................................................
Patch Set 1: Code-Review+1 (1 comment) https://gerrit.ovirt.org/#/c/41397/1/backend/manager/modules/uutils/src/main/java/org/ovirt/engine/core/uutils/cli/parser/ArgumentsParser.java File backend/manager/modules/uutils/src/main/java/org/ovirt/engine/core/uutils/cli/parser/ArgumentsParser.java: Line 270: } Line 271: Object convertedValue = null; Line 272: if (value != null) { Line 273: Matcher m = argument.getMatcher().matcher(value); Line 274: if (!m.matches()) { > or ^(aaa|bbb|ccc)$ :) I was curious about it also, so I tested for myself and it really works as Ondra said: Input: Matches: ad true AD true adipa false xad false So current regex in arguments.properties works great and it's readable, so I wouldn't change it. Line 275: errors.add( Line 276: new IllegalArgumentException( Line 277: String.format( Line 278: "Pattern for argument '%1$s' does not match, pattern is '%2$s', value is '%3$s", key, m.pattern(), value -- To view, visit https://gerrit.ovirt.org/41397 To unsubscribe, visit https://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ia05e674a77c5b431e07b95cdf4296488348a3249 Gerrit-PatchSet: 1 Gerrit-Project: ovirt-engine Gerrit-Branch: master Gerrit-Owner: Ondra Machacek <omach...@redhat.com> Gerrit-Reviewer: Alon Bar-Lev <alo...@redhat.com> Gerrit-Reviewer: Jenkins CI Gerrit-Reviewer: Martin Peřina <mper...@redhat.com> Gerrit-Reviewer: Ondra Machacek <omach...@redhat.com> Gerrit-Reviewer: Oved Ourfali <oourf...@redhat.com> Gerrit-Reviewer: automat...@ovirt.org Gerrit-HasComments: Yes _______________________________________________ Engine-patches mailing list Engine-patches@ovirt.org http://lists.ovirt.org/mailman/listinfo/engine-patches