Github user ottobackwards commented on a diff in the pull request:
https://github.com/apache/nifi/pull/2748#discussion_r193428577
--- Diff:
nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/test/java/org/apache/nifi/processors/standard/TestReplaceText.java
---
@@ -1074,12 +1090,11 @@ public void testRegexWithBadCaptureGroup() throws
IOException {
runner.setProperty(ReplaceText.REPLACEMENT_STRATEGY,
ReplaceText.REGEX_REPLACE);
runner.setProperty(ReplaceText.EVALUATION_MODE,
ReplaceText.ENTIRE_TEXT);
+ exception.expect(AssertionError.class);
+ exception.expectMessage("java.lang.IndexOutOfBoundsException: No
group 1");
--- End diff --
OK, I made it escape even if there are no named captures, reverted the
changed test.
---