janhoy commented on code in PR #1935:
URL: https://github.com/apache/solr/pull/1935#discussion_r1328508569


##########
solr/core/src/java/org/apache/solr/util/ModuleUtils.java:
##########
@@ -56,17 +55,9 @@ public static Path getModuleLibPath(Path solrInstallDirPath, 
String moduleName)
    * @return set of raw volume names from sysprop and/or env.var
    */
   static Set<String> resolveFromSyspropOrEnv() {
-    // Fall back to sysprop and env.var if nothing configured through solr.xml
-    Set<String> mods = new HashSet<>();
-    String modulesFromProps = System.getProperty("solr.modules");
-    if (StrUtils.isNotNullOrEmpty(modulesFromProps)) {
-      mods.addAll(StrUtils.splitSmart(modulesFromProps, ',', true));
-    }
-    String modulesFromEnv = System.getenv("SOLR_MODULES");
-    if (StrUtils.isNotNullOrEmpty(modulesFromEnv)) {
-      mods.addAll(StrUtils.splitSmart(modulesFromEnv, ',', true));
-    }
-    return mods.stream().map(String::trim).collect(Collectors.toSet());
+    return EnvUtils.getPropAsList("solr.modules", 
Collections.emptyList()).stream()
+        .map(String::trim)
+        .collect(Collectors.toSet());

Review Comment:
   No need for the `trim()` here, as `getPropAsList()` already trims values.



-- 
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: issues-unsubscr...@solr.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscr...@solr.apache.org
For additional commands, e-mail: issues-h...@solr.apache.org

Reply via email to