You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@dubbo.apache.org by li...@apache.org on 2021/06/10 16:08:23 UTC
[dubbo] branch master updated: Fix urls may be null,
and NullPointerException will be thrown in ConfigValidationUtils
(#8020) (#8021)
This is an automated email from the ASF dual-hosted git repository.
liujun pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/dubbo.git
The following commit(s) were added to refs/heads/master by this push:
new e6f39cd Fix urls may be null, and NullPointerException will be thrown in ConfigValidationUtils (#8020) (#8021)
e6f39cd is described below
commit e6f39cde5df886ad5d9b087a9a3698dbfd56c919
Author: skyguard1 <qh...@qq.com>
AuthorDate: Fri Jun 11 00:06:18 2021 +0800
Fix urls may be null, and NullPointerException will be thrown in ConfigValidationUtils (#8020) (#8021)
Fixes #8020
---
.../main/java/org/apache/dubbo/config/utils/ConfigValidationUtils.java | 3 +++
1 file changed, 3 insertions(+)
diff --git a/dubbo-config/dubbo-config-api/src/main/java/org/apache/dubbo/config/utils/ConfigValidationUtils.java b/dubbo-config/dubbo-config-api/src/main/java/org/apache/dubbo/config/utils/ConfigValidationUtils.java
index a2524ba..2f8090a 100644
--- a/dubbo-config/dubbo-config-api/src/main/java/org/apache/dubbo/config/utils/ConfigValidationUtils.java
+++ b/dubbo-config/dubbo-config-api/src/main/java/org/apache/dubbo/config/utils/ConfigValidationUtils.java
@@ -205,6 +205,9 @@ public class ConfigValidationUtils {
}
List<URL> urls = UrlUtils.parseURLs(address, map);
+ if (urls == null) {
+ throw new IllegalStateException(String.format("url should not be null,address is %s", address));
+ }
for (URL url : urls) {
url = URLBuilder.from(url)