change class loader (#11312)

This commit is contained in:
earthchen 2023-01-17 11:17:27 +08:00 committed by GitHub
parent 8cc353962f
commit d5e9c58846
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 9 additions and 11 deletions

View File

@ -46,13 +46,13 @@ public class ReflectionAbstractServerCall extends AbstractServerCall {
private List<MethodDescriptor> methodDescriptors;
public ReflectionAbstractServerCall(Invoker<?> invoker,
ServerStream serverStream,
FrameworkModel frameworkModel,
String acceptEncoding,
String serviceName,
String methodName,
List<HeaderFilter> headerFilters,
Executor executor) {
ServerStream serverStream,
FrameworkModel frameworkModel,
String acceptEncoding,
String serviceName,
String methodName,
List<HeaderFilter> headerFilters,
Executor executor) {
super(invoker, serverStream, frameworkModel,
getServiceDescriptor(invoker.getUrl()),
acceptEncoding, serviceName, methodName,
@ -155,10 +155,8 @@ public class ReflectionAbstractServerCall extends AbstractServerCall {
if (isClosed()) {
return null;
}
if (serviceDescriptor != null) {
ClassLoadUtil.switchContextLoader(
serviceDescriptor.getServiceInterfaceClass().getClassLoader());
}
ClassLoadUtil.switchContextLoader(
invoker.getUrl().getServiceModel().getClassLoader());
return packableMethod.getRequestUnpack().unpack(data);
}