You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@dubbo.apache.org by al...@apache.org on 2021/08/29 02:45:21 UTC

[dubbo] 01/02: Fix inject default model when scope is parent

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

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

commit 3dada2dca645dadaabd57f34995f7508ceee395f
Author: Albumen Kevin <jh...@gmail.com>
AuthorDate: Sun Aug 29 10:29:59 2021 +0800

    Fix inject default model when scope is parent
---
 .../src/main/java/org/apache/dubbo/rpc/model/ScopeModelUtil.java    | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/dubbo-common/src/main/java/org/apache/dubbo/rpc/model/ScopeModelUtil.java b/dubbo-common/src/main/java/org/apache/dubbo/rpc/model/ScopeModelUtil.java
index 7b93562..e59f7cb 100644
--- a/dubbo-common/src/main/java/org/apache/dubbo/rpc/model/ScopeModelUtil.java
+++ b/dubbo-common/src/main/java/org/apache/dubbo/rpc/model/ScopeModelUtil.java
@@ -23,7 +23,7 @@ public class ScopeModelUtil {
             return (ModuleModel) scopeModel;
         }
         if (scopeModel == null) {
-            ApplicationModel.defaultModel().getDefaultModule();
+            return ApplicationModel.defaultModel().getDefaultModule();
         }
         return null;
     }
@@ -36,7 +36,7 @@ public class ScopeModelUtil {
             return moduleModel.getApplicationModel();
         }
         if (scopeModel == null) {
-            ApplicationModel.defaultModel();
+            return ApplicationModel.defaultModel();
         }
         return null;
     }
@@ -51,7 +51,7 @@ public class ScopeModelUtil {
             return (FrameworkModel) scopeModel;
         }
         if (scopeModel == null) {
-            FrameworkModel.defaultModel();
+            return FrameworkModel.defaultModel();
         }
         return null;
     }