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:
[email protected]


With regards,
Apache Git Services

Reply via email to