bruno-roustant commented on a change in pull request #47:
URL: https://github.com/apache/solr/pull/47#discussion_r615963406
##########
File path: solr/core/src/java/org/apache/solr/core/SolrXmlConfig.java
##########
@@ -352,12 +358,19 @@ private static NodeConfig
fillSolrSection(NodeConfig.NodeConfigBuilder builder,
return builder.build();
}
- private static Set<Path> stringToPaths(String commaSeparatedString) {
+ private static List<String> separateStrings(String commaSeparatedString) {
+ if (Strings.isNullOrEmpty(commaSeparatedString)) {
+ return Collections.emptyList();
+ }
+ return Arrays.asList(COMMA_SEPARATED_PATTERN.split(commaSeparatedString));
+ }
+
+ private static Set<Path> separatePaths(String commaSeparatedString) {
if (Strings.isNullOrEmpty(commaSeparatedString)) {
return Collections.emptySet();
}
// Parse list of paths. The special value '*' is mapped to _ALL_ to mean
all paths
- return Arrays.stream(commaSeparatedString.split(",\\s?"))
+ return Arrays.stream(COMMA_SEPARATED_PATTERN.split(commaSeparatedString))
.map(p -> Paths.get("*".equals(p) ? "_ALL_" :
p)).collect(Collectors.toSet());
Review comment:
Ok. allowPaths is not part of the initial goal, but we can improve a bit
here.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]