yyqdbngt opened a new pull request, #2845:
URL: https://github.com/apache/rocketmq-dashboard/pull/2845
## Summary
- Bound `majorVersion` parsing in `ToolCatalog` so an out-of-integer-range
catalog
major version fails fast with an actionable startup error instead of a raw
`NumberFormatException`.
- Added regression test `rejectsMajorVersionThatOverflowsIntegerRange`.
## Why
The tool catalog schema accepts `^[0-9]+\.[0-9]+\.[0-9]+...` for `version`,
where the
major component is an unbounded digit string. A schema-valid catalog such as
`99999999999.0.0` made `Integer.parseInt` overflow at Spring bean
initialization,
surfacing as an obscure `NumberFormatException` (wrapped in
`BeanCreationException`)
instead of a clear message pointing at the catalog version. The bounded
parse now
reports the offending version explicitly.
## Testing
- `cd server && mvn -Dtest=ToolCatalogTest test` — Tests run: 7, Failures:
0, Errors: 0
--
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]