BurningCN commented on a change in pull request #9695:
URL: https://github.com/apache/dubbo/pull/9695#discussion_r816612561



##########
File path: 
dubbo-rpc/dubbo-rpc-api/src/main/java/org/apache/dubbo/rpc/proxy/AbstractProxyFactory.java
##########
@@ -110,7 +109,7 @@
     private <T> ClassLoader getClassLoader(Invoker<T> invoker) {
         ServiceModel serviceModel = invoker.getUrl().getServiceModel();
         ClassLoader classLoader = null;
-        if (serviceModel != null) {
+        if (serviceModel != null && serviceModel.getConfig() != null) {
             classLoader = serviceModel.getConfig().getInterfaceClassLoader();

Review comment:
       The `ProviderModel` used in `RestProtocolTest#registerProvider` does not 
specify the `ServiceConfig` value, which will cause the above 
NPE(`serviceModel.getConfig().getInterfaceClassLoader()`), so a 
judgment(`serviceModel.getConfig() != null`) is added




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to