[ 
https://issues.apache.org/jira/browse/MINIFI-497?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16802812#comment-16802812
 ] 

Aldrin Piri commented on MINIFI-497:
------------------------------------

[~VladimirMikhailov] Sounds great.  I'll keep an eye out for your PR.  Let me 
know if I can be of assistance.  I'll make sure you're a contributor to the 
project so you can self assign.

Thanks!

> С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
>            Priority: Critical
>              Labels: easyfix
>
> 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
(v7.6.3#76005)

Reply via email to