nfsantos commented on code in PR #1716:
URL: https://github.com/apache/jackrabbit-oak/pull/1716#discussion_r1760793059
##########
oak-run-commons/src/main/java/org/apache/jackrabbit/oak/index/indexer/document/flatfile/pipelined/ConfigHelper.java:
##########
@@ -48,4 +52,11 @@ public static boolean getSystemPropertyAsBoolean(String
name, boolean defaultVal
LOG.info("Config {}={}", name, value);
return value;
}
+
+ public static List<String> getSystemPropertyAsStringList(String name,
String defaultValue, String separator) {
+ String result = System.getProperty(name, defaultValue);
+ List<String> parts = result.isBlank() ? List.of() :
Arrays.stream(result.split(separator)).map(String::trim).collect(Collectors.toList());
Review Comment:
To reduce the chance of errors, I changed separator to be a `char` and use a
method from Commons Lang that splits using char, instead of regex. I created a
separate method as private. Maybe in the future could be made made into an
utility method, in case it does not already exist.
--
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.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]