Wweiei commented on code in PR #5845:
URL: https://github.com/apache/shenyu/pull/5845#discussion_r1879673871
##########
shenyu-admin/src/main/java/org/apache/shenyu/admin/service/impl/SelectorServiceImpl.java:
##########
@@ -294,12 +294,14 @@ private void unbindDiscovery(final List<SelectorDO>
selectors, final List<Plugin
if (Objects.nonNull(discoveryDO)) {
final DiscoveryProcessor discoveryProcessor =
discoveryProcessorHolder.chooseProcessor(discoveryDO.getType());
ProxySelectorDTO proxySelectorDTO = new ProxySelectorDTO();
+ proxySelectorDTO.setId(selector.getId());
proxySelectorDTO.setName(selector.getName());
-
proxySelectorDTO.setPluginName(pluginMap.getOrDefault(selector.getId(), ""));
+
proxySelectorDTO.setPluginName(pluginMap.getOrDefault(selector.getPluginId(),
""));
Review Comment:
```
Map<String, String> pluginMap = ListUtil.toMap(pluginDOS, PluginDO::getId,
PluginDO::getName);
```
The key for pluginMap is pluginId,the value for pluginMap is pluginName.
At this step the pluginMap's value is the divide plugin's id as key and the
divide plugin'name as the value.

If use the selectorId as key, it will get null value, instead of "divide".
--
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]