You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@servicecomb.apache.org by GitBox <gi...@apache.org> on 2018/03/30 01:45:38 UTC

[GitHub] WillemJiang commented on a change in pull request #626: [SCB-447] Optimize SPIServiceUtils

WillemJiang commented on a change in pull request #626: [SCB-447] Optimize SPIServiceUtils
URL: https://github.com/apache/incubator-servicecomb-java-chassis/pull/626#discussion_r178218879
 
 

 ##########
 File path: foundations/foundation-common/src/main/java/org/apache/servicecomb/foundation/common/utils/SPIServiceUtils.java
 ##########
 @@ -76,18 +63,65 @@ private SPIServiceUtils() {
       serviceEntries.add(entry);
     });
 
-    return serviceEntries.stream()
+    List<T> services = serviceEntries.stream()
         .sorted(Comparator.comparingInt(Entry::getKey))
         .map(Entry::getValue)
         .collect(Collectors.toList());
+
+    LOGGER.info("Found SPI service {}, count={}.", serviceType.getName(), services.size());
+    for (int idx = 0; idx < services.size(); idx++) {
 
 Review comment:
   Can we use the accumulator to do this job ?

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services