@see https://jira.springsource.org/browse/SPR-11354 : Regression from 3.2.x for FormattingConversionService.addFormatterForFieldType
How to test ?
git clonethe repository- do
mvn package
The module spring-3.2-working-test will SUCCEED,
but the module spring-4.0-failing-test will FAIL with :
Running org.springframework.format.support.SpringGenericTypeResolverTest Tests run: 1, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 0.081 sec : FAILURE! testType(org.springframework.format.support.SpringGenericTypeResolverTest) Time elapsed: 0.045 sec : ERROR! java.lang.IllegalArgumentException: Type must not be null at org.springframework.util.Assert.notNull(Assert.java:112) at org.springframework.core.convert.TypeDescriptor.valueOf(TypeDescriptor.java:507) at org.springframework.format.support.FormattingConversionService$PrinterConverter.(FormattingConversionService.java:123) at org.springframework.format.support.FormattingConversionService.addFormatterForFieldType(FormattingConversionService.java:80) at org.springframework.format.support.SpringGenericTypeResolverTest.register(SpringGenericTypeResolverTest.java:19) at org.springframework.format.support.SpringGenericTypeResolverTest.testType(SpringGenericTypeResolverTest.java:13)