Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ApplicationConversionService is not binary compatibility with 2.0.x #14938

Closed
jpmsilva opened this issue Oct 23, 2018 · 1 comment

Comments

Projects
None yet
3 participants
@jpmsilva
Copy link
Contributor

commented Oct 23, 2018

Starting with 2.1.0.M4, org.springframework.boot.convert.ApplicationConversionService.getSharedInstance() now returns an ApplicationConversionService instead of a ConversionService.

While ApplicationConversionService inherits from ConversionService, this does break binary compatibility according to Java rules.
This means that client code that called ApplicationConversionService.getSharedInstance() needs to be recompiled to work with Spring Boot 2.1, and will not be backward compatible with prior Spring Boot versions.

Currently this affects jasypt-spring-boot, as seen in ulisesbocchio/jasypt-spring-boot#102

While I understand that breaking changes must sometimes be introduced, I was wondering if there is a strong reason for this change, and if it might still be reversed if not?

I checked Spring Boot's code base, and it appears that only the following methods require that ApplicationConversionService.getSharedInstance() returns a ConfigurableConversionService (not an ApplicationConversionService).

The commit that introduces this change was 0c00508, with the comment

Update SpringApplication to automatically register the shared ApplicationConversionService instance with the BeanFactory and Environment.

Thanks in advance

@philwebb

This comment has been minimized.

Copy link
Member

commented Oct 24, 2018

Thanks for the detailed analysis. We indeed should try to remain binary compatible with 2.0. I've just pushed a fix to master.

@philwebb philwebb modified the milestones: 2.1.x, 2.1.0 Oct 24, 2018

@philwebb philwebb changed the title ApplicationConversionService breaks backward compatibility in 2.1.0.RC1 ApplicationConversionService is not binary compatibility with 2.0.x Oct 24, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.