Copilot commented on code in PR #855:
URL:
https://github.com/apache/rocketmq-dashboard/pull/855#discussion_r3703935712
##########
server/src/main/java/org/apache/rocketmq/studio/instance/dlq/DLQController.java:
##########
@@ -41,9 +42,16 @@ public Result<List<DLQGroupVO>>
listDLQGroups(@RequestParam(required = false) St
}
@PostMapping("/resend")
- public Result<Void> resendMessages(@Valid @RequestBody DLQResendRequestDTO
request) {
+ public Result<Void> resendMessages(@Valid @RequestBody(required = false)
DLQResendRequestDTO request) {
+ requireRequest(request);
Review Comment:
Setting `@RequestBody(required = false)` changes behavior for requests with
a missing body (or empty body) from Spring’s native ‘Required request body is
missing’ handling to the new `BusinessException` path. If the intent is to only
reject the *JSON literal* `null` while keeping missing-body behavior unchanged
(per PR description), keep `required` as the default (`true`) and still perform
the `request == null` guard—Spring/Jackson can deserialize a present body of
`null` into a null object without requiring `required = false`.
--
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]