yyqdbngt opened a new pull request, #2925: URL: https://github.com/apache/rocketmq-dashboard/pull/2925
## Summary - Order dashboard resources by description with `Comparator.nullsLast(...)` in `GrafanaDashboardService.resolveUniqueResources()` so a resource without a description is tolerated instead of throwing - Adds a regression test listing dashboards from resources where one description is null ## Why The duplicate-uid deduplication sorts resolved resources by `Resource.getDescription()` to pick a deterministic winner, but the plain `Comparator.comparing(Resource::getDescription)` NPEs when a resource's description is null (the default `PathMatchingResourcePatternResolver` always sets one, but the resolver is injected and the test seam already overrides it). One such resource made `listDashboards()`, `getDashboard()` and the archive export all fail with a 500. ## Testing - `mvn -Dtest=GrafanaDashboardServiceTest test` → Tests run: 13, Failures: 0, Errors: 0 (1 new; verified it errors with the pre-fix comparator) -- 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]
