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