[ 
https://issues.apache.org/jira/browse/MINIFI-497?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Matt Burgess updated MINIFI-497:
--------------------------------
    Fix Version/s:     (was: 0.6.0)
                   1.14.0

> С2 Server: wrong regex pattern in "getConfiguration" 
> (NiFiRestConfigurationProvider.java)
> -----------------------------------------------------------------------------------------
>
>                 Key: MINIFI-497
>                 URL: https://issues.apache.org/jira/browse/MINIFI-497
>             Project: Apache NiFi MiNiFi
>          Issue Type: Bug
>          Components: Command and Control
>    Affects Versions: 0.5.0
>            Reporter: Vladimir Mikhailov
>            Assignee: Vladimir Mikhailov
>            Priority: Critical
>              Labels: easyfix
>             Fix For: 1.14.0
>
>          Time Spent: 0.5h
>  Remaining Estimate: 0h
>
> C2 Server can't get from NiFi templates with versions v10+, only v1-v9.
> The reason is an error in the "getConfiguration" function, where 
> "filenamePattern" is determined.
> Wrong code (maybe a typo?):
> {code:java}
> String filenamePattern = 
> Arrays.stream(filename.split(Pattern.quote("${version}"), 
> -1)).map(Pattern::quote).collect(Collectors.joining("([0-9+])"));
> {code}
> It should be:
> {code:java}
> String filenamePattern = 
> Arrays.stream(filename.split(Pattern.quote("${version}"), 
> -1)).map(Pattern::quote).collect(Collectors.joining("([0-9]+)"));
> {code}
> {code:java}
> [0-9+] -> [0-9]+{code}
> Link to source code:
> https://github.com/apache/nifi-minifi/blob/master/minifi-c2/minifi-c2-provider/minifi-c2-provider-nifi-rest/src/main/java/org/apache/nifi/minifi/c2/provider/nifi/rest/NiFiRestConfigurationProvider.java#L105



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to