Remove compatibility code for EOL dependency versions#50360
Open
SebTardif wants to merge 3 commits intospring-projects:mainfrom
Open
Remove compatibility code for EOL dependency versions#50360SebTardif wants to merge 3 commits intospring-projects:mainfrom
SebTardif wants to merge 3 commits intospring-projects:mainfrom
Conversation
Remove NoSuchMethodError catch blocks and reflective fallbacks for dependency versions that are no longer supported: - Flyway < 7.0 and < 9.14 (managed version: 12.4.0) - Tomcat 8.5/9.0 (Boot 4.x uses Jakarta EE) - Hazelcast 4 (managed version: 5.5.0) - Jetty 10 (managed version: 12.1.8) Signed-off-by: Sebastien Tardif <sebtardif@ncf.ca>
The executeInTransaction method does not exist in Flyway 11.0, which is still supported via ClassPathOverrides in tests. Restore the catch block with an updated comment reflecting the actual version boundary. Signed-off-by: Sebastien Tardif <sebtardif@ncf.ca>
The migrate() method signature differs between Flyway 11.0 and 12.x. The reflective fallback is needed when running against older Flyway versions, as verified by Flyway110AutoConfigurationTests. Signed-off-by: Sebastien Tardif <sebtardif@ncf.ca>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Spring Boot 4.x has bumped minimum dependency versions well past the versions guarded by these
catch (NoSuchMethodError)blocks. The removed code paths are dead code that can never execute on supported dependency versions.Removals:
setHostHeader()guard inTomcatWebServerFactoryCustomizer. Boot 4.x usesjakarta.servlet, making deployment to Tomcat 8.5/9.0 impossible.setClearReferencesThreadLocals()guard inDisableReferenceClearingContextCustomizer. Method exists in all Tomcat 10.x+ (added in 9.0.14, and 10.x forked from 9.0.45+).RuntimeHintsRegistrarinHazelcastCacheMeterBinderProvider. Managed version is Hazelcast 5.5.0.isJetty10()check and reflectiveshutdown()fallback inGracefulShutdown. Managed version is Jetty 12.1.8.Comment updates (no code change):
migrate()andexecuteInTransaction()compat guards from "Flyway < 7.0" / "Flyway < 9.14" to "Flyway < 10.x/11.x compatibility", sinceFlyway110AutoConfigurationTestsconfirms these guards are still needed for Flyway 11.0 support.Compatibility guards for still-supported versions (Tomcat < 10.1.42 for
setMaxPartCount/setMaxPartHeaderSize,setReadOnlyfor older 10.1.x, and Flyway < 12.x) are intentionally retained.