Skip to content

Commit 6b50b7b

Browse files
committed
Initialize propertyName in TypeMismatchException
See gh-26219
1 parent 96895c7 commit 6b50b7b

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

spring-webflux/src/main/java/org/springframework/web/reactive/result/method/annotation/AbstractNamedValueArgumentResolver.java

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2002-2022 the original author or authors.
2+
* Copyright 2002-2023 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -196,6 +196,7 @@ private Object applyConversion(@Nullable Object value, NamedValueInfo namedValue
196196
throw new ServerErrorException("Conversion not supported.", parameter, ex);
197197
}
198198
catch (TypeMismatchException ex) {
199+
ex.initPropertyName(namedValueInfo.name);
199200
throw new ServerWebInputException("Type mismatch.", parameter, ex);
200201
}
201202
return value;

0 commit comments

Comments
 (0)