[ISSUE#8358] make this anonymous inner class a lambda (#8365)
This commit is contained in:
parent
d89076b3e6
commit
eb57028ba6
@ -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));
|
||||
}
|
||||
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user