RockteMQ-AI commented on issue #2212: URL: https://github.com/apache/rocketmq-dashboard/issues/2212#issuecomment-5300448663
**Issue Evaluation** Category: `bug` | Status: **Confirmed** The reported issue has been verified against the current codebase. **Root Cause:** `ClusterRepositoryImpl.defensiveCopy` creates new `ArrayList` instances for brokers/proxies/nameServers lists, but the `BrokerVO`, `ProxyVO`, and `NameServerVO` elements inside remain shared references with the cached cluster. Mutating a nested object from `findById` or `findAll` therefore changes the cached state. Additionally, `updateConfig` stores the caller's `ClusterConfigVO` directly via `updated.setConfig(config)` without copying, allowing post-update mutations to bypass the repository API. **Impact:** Repository encapsulation is violated — callers can corrupt cached cluster state through returned objects or through the config object passed to `updateConfig`. **Severity:** medium An automated fix proposal will be generated. Reply `/approve` to proceed with PR generation. --- *Automated evaluation by github-manager-bot* -- 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]
