RockteMQ-AI commented on issue #4048: URL: https://github.com/apache/rocketmq-dashboard/issues/4048#issuecomment-5565318004
**Issue Evaluation** Category: `bug` | Status: **Confirmed** The reported issue has been verified against the current codebase on the `rocketmq-studio` branch. **Root Cause:** The `@Cacheable` key expression at `SettingsService.java:221` uses SpEL string concatenation (`'page:' + #search + ':' + #type + ':' + #page + ':' + #pageSize`). SpEL renders Java `null` as the literal text `"null"`, so `search == null` and `search == "null"` produce the identical cache key `page:null:null:1:20`. **Affected Code:** `server/src/main/java/org/apache/rocketmq/studio/settings/SettingsService.java:221`. Caching is enabled via `@EnableCaching` in `StudioApplication.java:27`; no custom `KeyGenerator` or cache configuration overrides exist. **Impact:** Incorrect cached page returned when a literal `"null"` search is made after an unfiltered request (or vice versa). **Severity:** Low — the collision only occurs for the literal string `"null"`. **Proposed Fix:** Remove the explicit `key` attribute and rely on Spring's default `SimpleKeyGenerator`, which correctly distinguishes `null` from `"null"` across method arguments. A regression test covering both cases should be added. An automated fix proposal can be generated. Reply with: - `/approve` — proceed with PR generation - `/revise` — request a different approach - `/reject` — decline automated fix --- *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]
