删除多余空格和多余包

pull/119/head
weihu 3 years ago
parent 8c1afdb62f
commit 294f8fd93a

@ -1,17 +1,12 @@
package cn.hippo4j.starter.handler.web; package cn.hippo4j.starter.handler.web;
import cn.hippo4j.common.config.ApplicationContextHolder; import cn.hippo4j.common.config.ApplicationContextHolder;
import cn.hippo4j.common.model.PoolParameterInfo;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
import org.springframework.boot.web.context.WebServerApplicationContext; import org.springframework.boot.web.context.WebServerApplicationContext;
import org.springframework.boot.web.server.WebServer; import org.springframework.boot.web.server.WebServer;
import org.springframework.boot.web.servlet.context.ServletWebServerInitializedEvent;
import org.springframework.context.ApplicationContext; import org.springframework.context.ApplicationContext;
import org.springframework.context.ApplicationListener;
import java.util.concurrent.Executor; import java.util.concurrent.Executor;
import java.util.concurrent.ThreadPoolExecutor;
import java.util.concurrent.TimeUnit;
/** /**
* Abstract web thread pool service. * Abstract web thread pool service.
@ -34,8 +29,6 @@ public abstract class AbstractWebThreadPoolService implements WebThreadPoolServi
*/ */
protected abstract Executor getWebThreadPoolByServer(WebServer webServer); protected abstract Executor getWebThreadPoolByServer(WebServer webServer);
@Override @Override
public Executor getWebThreadPool() { public Executor getWebThreadPool() {
if (executor == null) { if (executor == null) {

@ -24,14 +24,11 @@ public class UndertowWebThreadPoolHandler extends AbstractWebThreadPoolService {
private static final String UNDERTOW_NAME = "undertow"; private static final String UNDERTOW_NAME = "undertow";
@Override @Override
protected Executor getWebThreadPoolByServer(WebServer webServer) { protected Executor getWebThreadPoolByServer(WebServer webServer) {
// There is no need to consider reflection performance because the fetch is a singleton // There is no need to consider reflection performance because the fetch is a singleton
UndertowWebServer undertowWebServer = (UndertowWebServer) webServer; UndertowWebServer undertowWebServer = (UndertowWebServer) webServer;
Field undertowField = ReflectionUtils.findField(UndertowWebServer.class, UNDERTOW_NAME); Field undertowField = ReflectionUtils.findField(UndertowWebServer.class, UNDERTOW_NAME);
assert undertowField != null;
ReflectionUtils.makeAccessible(undertowField); ReflectionUtils.makeAccessible(undertowField);
Undertow undertow = (Undertow) ReflectionUtils.getField(undertowField, undertowWebServer); Undertow undertow = (Undertow) ReflectionUtils.getField(undertowField, undertowWebServer);
return Objects.isNull(undertow) ? null : undertow.getWorker(); return Objects.isNull(undertow) ? null : undertow.getWorker();

Loading…
Cancel
Save