This is an automated email from the ASF dual-hosted git repository.
aldrin pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/nifi-minifi.git
The following commit(s) were added to refs/heads/master by this push:
new 484bdb9 MINIFI-497 С2 Server: Fix wrong regex pattern in
"getConfiguration" (NiFiRestConfigurationProvider.java)
484bdb9 is described below
commit 484bdb92e74432d5495e75eaad3229bf8369f201
Author: Vladimir Mikhailov <[email protected]>
AuthorDate: Thu Mar 28 15:53:49 2019 +0500
MINIFI-497 С2 Server: Fix wrong regex pattern in "getConfiguration"
(NiFiRestConfigurationProvider.java)
This closes #151.
Signed-off-by: Aldrin Piri <[email protected]>
---
.../minifi/c2/provider/nifi/rest/NiFiRestConfigurationProvider.java | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git
a/minifi-c2/minifi-c2-provider/minifi-c2-provider-nifi-rest/src/main/java/org/apache/nifi/minifi/c2/provider/nifi/rest/NiFiRestConfigurationProvider.java
b/minifi-c2/minifi-c2-provider/minifi-c2-provider-nifi-rest/src/main/java/org/apache/nifi/minifi/c2/provider/nifi/rest/NiFiRestConfigurationProvider.java
index 8f0bf2c..6067d7c 100644
---
a/minifi-c2/minifi-c2-provider/minifi-c2-provider-nifi-rest/src/main/java/org/apache/nifi/minifi/c2/provider/nifi/rest/NiFiRestConfigurationProvider.java
+++
b/minifi-c2/minifi-c2-provider/minifi-c2-provider-nifi-rest/src/main/java/org/apache/nifi/minifi/c2/provider/nifi/rest/NiFiRestConfigurationProvider.java
@@ -102,7 +102,7 @@ public class NiFiRestConfigurationProvider implements
ConfigurationProvider {
String id = null;
if (version == null) {
- String filenamePattern =
Arrays.stream(filename.split(Pattern.quote("${version}"),
-1)).map(Pattern::quote).collect(Collectors.joining("([0-9+])"));
+ String filenamePattern =
Arrays.stream(filename.split(Pattern.quote("${version}"),
-1)).map(Pattern::quote).collect(Collectors.joining("([0-9]+)"));
Pair<String, Integer> maxIdAndVersion =
getMaxIdAndVersion(filenamePattern);
id = maxIdAndVersion.getFirst();
version = maxIdAndVersion.getSecond();