Aias00 commented on code in PR #5708:
URL: https://github.com/apache/shenyu/pull/5708#discussion_r4091664618
##########
shenyu-plugin/shenyu-plugin-proxy/shenyu-plugin-rpc/shenyu-plugin-dubbo/shenyu-plugin-apache-dubbo/src/main/java/org/apache/shenyu/plugin/apache/dubbo/cache/ApacheDubboConfigCache.java:
##########
@@ -307,6 +307,17 @@ private ReferenceConfig<GenericService>
buildReference(final MetaData metaData,
reference.setRegistry(registryConfig);
reference.setConsumer(consumerConfig);
reference.setInterface(metaData.getServiceName());
+
+ // Fix dubbo application discover cannot get service provider
information #5708
+ try {
+ ConfigManager configManager =
reference.getApplicationModel().getApplicationConfigManager();
Review Comment:
`ConfigManager` is not imported — this is the only occurrence of the symbol
in the file (verified at the PR head), so the module will not compile.
Please add:
```java
import org.apache.dubbo.config.manager.ConfigManager;
```
Two more things on this block:
- The blank line above the comment contains trailing whitespace (`+
`), which will fail checkstyle.
- `catch (Throwable)` also swallows `Error` (`NoSuchMethodError`,
`NoClassDefFoundError`), and would hide a genuine bug in this new code as a log
line. Prefer `catch (Exception e)`.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]