Ludovic Praud opened SPR-11354 and commented

I've tried to migrate my project from spring 3.2.x to 4.0 following #15865 comment https://jira.springsource.org/browse/SPR-11240#comment-97549.

But it turns out that I have a compatibility problem using FormattingConversionService.addFormatterForFieldType which throws a java.lang.IllegalArgumentException: Type must not be null.

I've created a reproduction project, see the given reference URL.


Affects: 4.0 GA

Reference URL: https://github.com/lpraud/spring-4.0-type-resolver-bug

Referenced from: commits https://github.com/spring-projects/spring-framework/commit/eeae5fba957f46ecf0f83db526a30b0480a070db

Comment From: spring-projects-issues

Juergen Hoeller commented

This turned out to be a regression in TypeDescriptor.valueOf(Class) which used to accept a null value but doesn't anymore in the 4.0 line. Fixed for 4.0.1 now.

Juergen

Comment From: spring-projects-issues

Juergen Hoeller commented

Ludovic, if you have the chance, could you please give the latest 4.0.1 snapshot a try and verify whether it works for you? It's scheduled for release on Monday, so there's still some time left for pre-release testing... See http://projects.spring.io/spring-framework/ for the Maven coordinates.

Juergen

Comment From: spring-projects-issues

Ludovic Praud commented

This fix works pretty well indeed. Thanks.