kyounghunJang commented on code in PR #15721:
URL: https://github.com/apache/dubbo/pull/15721#discussion_r2442183277


##########
dubbo-config/dubbo-config-spring/src/main/java/org/apache/dubbo/config/spring/reference/ReferenceBeanManager.java:
##########
@@ -192,6 +192,11 @@ public synchronized void initReferenceBean(ReferenceBean 
referenceBean) throws E
             // cache referenceConfig
             referenceConfigMap.put(referenceKey, referenceConfig);
 
+            // add a null check for moduleModel to be compatible with the 
native environment
+            if (moduleModel == null) {
+                moduleModel = 
DubboBeanUtils.getModuleModel(applicationContext);
+            }
+
             // register ReferenceConfig
             moduleModel.getConfigManager().addReference(referenceConfig);
             moduleModel.getDeployer().setPending();

Review Comment:
   @zrlw 
   Thanks for the feedback! I’ve applied the changes.



-- 
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