删掉对sun.misc.Unsafe的依赖和替换过期方法Class.newInstance()

This commit is contained in:
Redkale
2018-03-07 11:31:11 +08:00
parent 93698bacff
commit 53df45456f
21 changed files with 74 additions and 68 deletions

View File

@@ -149,7 +149,7 @@ public abstract class NodeServer {
String interceptorClass = this.serverConf.getValue("interceptor", "");
if (!interceptorClass.isEmpty()) {
Class clazz = serverClassLoader.loadClass(interceptorClass);
this.interceptor = (NodeInterceptor) clazz.newInstance();
this.interceptor = (NodeInterceptor) clazz.getDeclaredConstructor().newInstance();
}
ClassFilter<Service> serviceFilter = createServiceClassFilter();