You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
TypeConverterSupport does not propagate custom exceptions anymore [SPR-14661] #19225
in: coreIssues in core modules (aop, beans, core, context, expression)status: backportedAn issue that has been backported to maintenance branchestype: regressionA bug that is also a regression
catch (Throwable ex) on line 77 in TypeConverterSupport. In SpringBoot application we can't properly use @ControllerAdvice because our specific exception that we throw in converter catches in TypeConverterSupport and instead it throws TypeMismatchException.
This seems to be a consequence of the fix in #18917 and therefore a regression. We'll revisit this for 4.2.8 / 4.3.3, possibly enumerating all actual type-mismatch-like exceptions there.
I've revised the fix for #18917 such that it only applies to Formatter.parse invocations, not to general conversion attempts. Specifically, TypeConverterSupport just catches IllegalArgumentException again but FormatterPropertyEditorAdapter turns any exception into an IllegalArgumentException if necessary now.
in: coreIssues in core modules (aop, beans, core, context, expression)status: backportedAn issue that has been backported to maintenance branchestype: regressionA bug that is also a regression
Activity
spring-projects-issues commentedon Sep 2, 2016
Juergen Hoeller commented
This seems to be a consequence of the fix in #18917 and therefore a regression. We'll revisit this for 4.2.8 / 4.3.3, possibly enumerating all actual type-mismatch-like exceptions there.
spring-projects-issues commentedon Sep 13, 2016
Juergen Hoeller commented
I've revised the fix for #18917 such that it only applies to
Formatter.parseinvocations, not to general conversion attempts. Specifically,TypeConverterSupportjust catchesIllegalArgumentExceptionagain butFormatterPropertyEditorAdapterturns any exception into anIllegalArgumentExceptionif necessary now.spring-projects-issues commentedon Sep 15, 2016
Juergen Hoeller commented
It would be great if you could give the latest
4.2.8.BUILD-SNAPSHOTor4.3.3.BUILD-SNAPSHOTa try to check whether it works for you again...