Vojtech Szocs has posted comments on this change. Change subject: webadmin: Replace inner variable references in failure messages ......................................................................
Patch Set 2: Code-Review+2 Here are some facts for GWT RegExp class: * com.google.gwt.regexp.shared.RegExp = default *server-side* implementation using java.util.regex.Pattern (which is not emulated by GWT SDK) * RegExp *client-side* implementation (used by GWT compiler) = gwt-user-{version}.jar/com/google/gwt/regexp/super/com/google/gwt/regexp/shared/RegExp.java * the client-side implementation just delegates to JavaScript RegExp object [1] [1] https://developer.mozilla.org/en/docs/Web/JavaScript/Reference/Global_Objects/RegExp So the variable replacement logic fixed by this patch essentially depends on JavaScript RegExp.exec function behavior [2]. [2] https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/RegExp/exec As mentioned in [3], by using "global" flag, invocation of "exec" method updates the "lastIndex" (this behavior is consistent with server-side RegExp implementation), which is why we need to reset "lastIndex" value to 0 to ensure proper variable processing. [3] https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/RegExp/exec#Example.3A_Finding_successive_matches -- To view, visit http://gerrit.ovirt.org/26621 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: If70582ae35b8f94b4101dfc33865cc7976fd625c Gerrit-PatchSet: 2 Gerrit-Project: ovirt-engine Gerrit-Branch: master Gerrit-Owner: Martin Sivák <msi...@redhat.com> Gerrit-Reviewer: Gilad Chaplik <gchap...@redhat.com> Gerrit-Reviewer: Kobi Ianko <k...@redhat.com> Gerrit-Reviewer: Martin Sivák <msi...@redhat.com> Gerrit-Reviewer: Vojtech Szocs <vsz...@redhat.com> Gerrit-Reviewer: automat...@ovirt.org Gerrit-Reviewer: oVirt Jenkins CI Server Gerrit-HasComments: No _______________________________________________ Engine-patches mailing list Engine-patches@ovirt.org http://lists.ovirt.org/mailman/listinfo/engine-patches