This is an automated email from the ASF dual-hosted git repository.

albumenj pushed a commit to branch 3.0
in repository https://gitbox.apache.org/repos/asf/dubbo.git


The following commit(s) were added to refs/heads/3.0 by this push:
     new e6f169d0d4 fix ScopeBeanExtensionInjector npe (#10140)
e6f169d0d4 is described below

commit e6f169d0d424de440041f9447f406b7a48868c9b
Author: Wang Chengming <[email protected]>
AuthorDate: Sun Jun 12 22:43:35 2022 +0800

    fix ScopeBeanExtensionInjector npe (#10140)
    
    Co-authored-by: 呈铭 <[email protected]>
---
 .../java/org/apache/dubbo/common/beans/ScopeBeanExtensionInjector.java  | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git 
a/dubbo-common/src/main/java/org/apache/dubbo/common/beans/ScopeBeanExtensionInjector.java
 
b/dubbo-common/src/main/java/org/apache/dubbo/common/beans/ScopeBeanExtensionInjector.java
index 0b691c090d..98f6edc1be 100644
--- 
a/dubbo-common/src/main/java/org/apache/dubbo/common/beans/ScopeBeanExtensionInjector.java
+++ 
b/dubbo-common/src/main/java/org/apache/dubbo/common/beans/ScopeBeanExtensionInjector.java
@@ -37,6 +37,6 @@ public class ScopeBeanExtensionInjector implements 
ExtensionInjector, ScopeModel
 
     @Override
     public <T> T getInstance(Class<T> type, String name) {
-        return beanFactory.getBean(name, type);
+        return beanFactory == null ? null : beanFactory.getBean(name, type);
     }
 }

Reply via email to