[ISSUE#8358] make this anonymous inner class a lambda (#8365)

This commit is contained in:
david6969xin 2022-05-13 11:32:21 +08:00 committed by GitHub
parent d89076b3e6
commit eb57028ba6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -17,7 +17,6 @@
package com.alibaba.nacos.api.remote;
import java.util.concurrent.ScheduledThreadPoolExecutor;
import java.util.concurrent.ThreadFactory;
/**
* rpc scheduler executor .
@ -34,12 +33,7 @@ public class RpcScheduledExecutor extends ScheduledThreadPoolExecutor {
"com.alibaba.nacos.remote.ServerCommonScheduler");
public RpcScheduledExecutor(int corePoolSize, final String threadName) {
super(corePoolSize, new ThreadFactory() {
@Override
public Thread newThread(Runnable r) {
return new Thread(r, threadName);
}
});
super(corePoolSize, r -> new Thread(r, threadName));
}
}