This is an automated email from the ASF dual-hosted git repository.
tydhot pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-shenyu.git
The following commit(s) were added to refs/heads/master by this push:
new b8995d6 Fix the bug of building sofa-rpc reference error in sofa
plugin (#2183)
b8995d6 is described below
commit b8995d64c99ac4e0afd34739a5ded95febd1baba
Author: Kunshuai Zhu <[email protected]>
AuthorDate: Thu Sep 30 10:33:35 2021 -0500
Fix the bug of building sofa-rpc reference error in sofa plugin (#2183)
---
.../org/apache/shenyu/plugin/sofa/cache/ApplicationConfigCache.java | 3 +++
1 file changed, 3 insertions(+)
diff --git
a/shenyu-plugin/shenyu-plugin-sofa/src/main/java/org/apache/shenyu/plugin/sofa/cache/ApplicationConfigCache.java
b/shenyu-plugin/shenyu-plugin-sofa/src/main/java/org/apache/shenyu/plugin/sofa/cache/ApplicationConfigCache.java
index c5a1a4f..1cc13bf 100644
---
a/shenyu-plugin/shenyu-plugin-sofa/src/main/java/org/apache/shenyu/plugin/sofa/cache/ApplicationConfigCache.java
+++
b/shenyu-plugin/shenyu-plugin-sofa/src/main/java/org/apache/shenyu/plugin/sofa/cache/ApplicationConfigCache.java
@@ -134,6 +134,9 @@ public final class ApplicationConfigCache {
* @return the reference config
*/
public ConsumerConfig<GenericService> build(final MetaData metaData) {
+ if (Objects.isNull(applicationConfig) ||
Objects.isNull(registryConfig)) {
+ return new ConsumerConfig<>();
+ }
ConsumerConfig<GenericService> reference = new ConsumerConfig<>();
reference.setGeneric(true);
reference.setApplication(applicationConfig);