You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@shardingsphere.apache.org by GitBox <gi...@apache.org> on 2020/10/18 07:21:01 UTC

[GitHub] [shardingsphere-elasticjob] wwj-go commented on a change in pull request #1567: Refactor ElasticJobServiceLoader, remove unused code and use Optional…

wwj-go commented on a change in pull request #1567:
URL: https://github.com/apache/shardingsphere-elasticjob/pull/1567#discussion_r507028969



##########
File path: elasticjob-infra/elasticjob-infra-common/src/main/java/org/apache/shardingsphere/elasticjob/infra/handler/threadpool/JobExecutorServiceHandlerFactory.java
##########
@@ -42,8 +43,11 @@
      */
     public static JobExecutorServiceHandler getHandler(final String type) {
         if (Strings.isNullOrEmpty(type)) {
-            return ElasticJobServiceLoader.getCachedInstance(JobExecutorServiceHandler.class, DEFAULT_HANDLER);
+            return ElasticJobServiceLoader.getCachedTypedServiceInstance(JobExecutorServiceHandler.class, DEFAULT_HANDLER)

Review comment:
       This is a redundant check and will be replaced with a simple Optional#get , as will JobShardingStrategyFactory#getStrategy




----------------------------------------------------------------
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:
users@infra.apache.org