[
https://issues.apache.org/jira/browse/NIFI-1919?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15310480#comment-15310480
]
ASF GitHub Bot commented on NIFI-1919:
--------------------------------------
Github user mattyb149 commented on a diff in the pull request:
https://github.com/apache/nifi/pull/474#discussion_r65383800
--- Diff:
nifi-nar-bundles/nifi-scripting-bundle/nifi-scripting-processors/src/test/groovy/org/apache/nifi/processors/script/ExecuteScriptGroovyTest.groovy
---
@@ -149,6 +150,7 @@ class ExecuteScriptGroovyTest extends BaseScriptTest {
}
}
+ @Ignore("This test fails intermittently when the serial execution
happens faster than pooled")
--- End diff --
This file should not be listed in the diff. Can you rebase against the
latest master? I suspect the SHA of the commit changed from the one on your
branch when I did a sign-off or a commit --amend to add the "This closes" line,
or something.
> Expression Language only evaluates regular expression replacement on
> replaceAll, not replace
> --------------------------------------------------------------------------------------------
>
> Key: NIFI-1919
> URL: https://issues.apache.org/jira/browse/NIFI-1919
> Project: Apache NiFi
> Issue Type: Bug
> Components: Core Framework
> Affects Versions: 0.6.1
> Reporter: Andy LoPresto
> Assignee: Andy LoPresto
> Fix For: 1.0.0, 0.7.0
>
>
> When {{${attribute:replaceAll('\w+', 'replacement')}}} is called, the pattern
> is matched and applied. However, when {{${attribute:replace('\w+',
> 'replacement')}}} is called, it is not. I believe this is because
> {{ReplaceAllEvaluator}} uses {{String#replaceAll(String regex, String
> replacement)}} while {{ReplaceEvaluator}} uses {{String#replace(CharSequence
> target, CharSequence replacement)}} which then uses
> {{Pattern.compile(target.toString(), Pattern.LITERAL)}} instead of compiling
> for a regular expression. I am writing a unit test to demonstrate this and
> show the results when {{String#replaceFirst()}} is used instead.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)