RockteMQ-AI commented on issue #2258:
URL:
https://github.com/apache/rocketmq-dashboard/issues/2258#issuecomment-5303063736
**Issue Evaluation**
Category: `enhancement` | Status: **Evaluated**
**Feasibility:** Feasible
**Scope:** Alert rule DTO validation, DTO-to-domain conversion, persistence
adapter, repository read normalization
**Branch:** `rocketmq-studio`
The `channels` field in `AlertRuleRequestDTO` is an unconstrained
`List<String>` with no element-level validation. `MybatisPlusAlertRepository`
uses `String.join(",", rule.getChannels())` which will throw
`NullPointerException` if any element is null. Blank and duplicate entries are
also stored as-is.
**Proposed fix scope:**
1. Add `@Valid` + element-level `@NotBlank` validation on the DTO
2. Canonicalize in DTO-to-VO conversion (trim + deduplicate preserving order)
3. Defensive normalization in persistence write path
4. Normalize legacy comma-separated rows on read
---
*Automated evaluation by RockteMQ-AI*
--
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]