chibenwa commented on a change in pull request #461:
URL: https://github.com/apache/james-project/pull/461#discussion_r641524791



##########
File path: 
server/container/guice/guice-utils/src/main/java/org/apache/james/utils/ExtensionConfiguration.java
##########
@@ -19,24 +19,25 @@
 
 package org.apache.james.utils;
 
-import java.util.Arrays;
 import java.util.List;
-import java.util.Optional;
 
 import org.apache.commons.configuration2.Configuration;
 
 import com.github.steveash.guavate.Guavate;
+import com.google.common.base.Splitter;
 import com.google.common.collect.ImmutableList;
 
 public class ExtensionConfiguration {
     public static final ExtensionConfiguration DEFAULT = new 
ExtensionConfiguration(ImmutableList.of());
 
     public static ExtensionConfiguration from(Configuration configuration) {
-        List<String> list = 
Optional.ofNullable(configuration.getStringArray("guice.extension.module"))
-            .map(Arrays::asList)
-            .orElse(ImmutableList.of());
+        String rawString = configuration.getString("guice.extension.module", 
"");
 
-        return new ExtensionConfiguration(list.stream()
+        return new ExtensionConfiguration(Splitter.on(",")
+            .omitEmptyStrings()
+            .trimResults()

Review comment:
       This code path is only executed once.
   
   Do we care? Sounds like early optimisation to me...

##########
File path: 
server/container/guice/protocols/webadmin/src/main/java/org/apache/james/modules/server/WebAdminServerModule.java
##########
@@ -138,6 +138,16 @@ public WebAdminConfiguration 
provideWebAdminConfiguration(FileSystem fileSystem,
         }
     }
 
+    @VisibleForTesting
+    ImmutableList<String> additionalRoutes(Configuration configurationFile) {
+        String rawString = configurationFile.getString("extensions.routes", 
"");
+
+        return ImmutableList.copyOf(Splitter.on(',')

Review comment:
       This code path is only executed once.
   
   Do we care? Sounds like early optimisation to me...




-- 
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]

Reply via email to