Fix the bug of building sofa-rpc reference error in sofa plugin
@@ -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);
