Skip to content

TypeMismatchException for @RequestParam does not contain parameter name [SPR-10153] #14786

Closed
@spring-projects-issues

Description

@spring-projects-issues

Michael Osipov opened SPR-10153 and commented

I have defined a mapping like this:

public ResponseEntity<Object> lookupProject(@PathVariable String project,
			@RequestParam(value = "outputType", required = false, defaultValue = "HASH") OutputType outputType)

OutputType is an enum with values HASH and ARRAY.

When the converter is not able to converter to an enum a TypeMismatchException is issued. Unfortunately, TypeMismatchException#getPropertyName is not populated. I cannot reasonbly determine that exactly this parameter has failed.
Please add the appropriate PropertyChangeEvent.


Affects: 3.1.3

Issue Links:

Referenced from: commits 6f5359e

3 votes, 8 watchers

Metadata

Metadata

Assignees

Labels

in: webIssues in web modules (web, webmvc, webflux, websocket)type: enhancementA general enhancement

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions