Skip to content

@Nonnull annotation breaks ServletRequestMethodArgumentResolver for Principal #25981

Closed
@rcaspar

Description

@rcaspar

If you have something like:

@GetMapping("/foo")
public ResponseEntity<?> method(@Nonnull Principal principal) {
    return ResponseEntity.ok("bar");
}

ServletRequestMethodArgumentResolver will fail to resolve the principal parameter because there's some annotation on it.

I think this is a regression introduced by #19779

Metadata

Metadata

Assignees

Labels

in: webIssues in web modules (web, webmvc, webflux, websocket)type: regressionA bug that is also a regression

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions