From bb2936d86d46565b6111c360800019485121de0a Mon Sep 17 00:00:00 2001 From: spencergibb Date: Thu, 16 Jan 2025 12:57:49 -0500 Subject: [PATCH] Updates to support boot 3.5.0-SNAPSHOT --- .../CompatibilityVerifierProperties.java | 4 ++-- .../SpringBootVersionVerifier.java | 20 +++++++++---------- .../SpringBootDependencyTests.java | 8 ++++---- 3 files changed, 16 insertions(+), 16 deletions(-) diff --git a/spring-cloud-commons/src/main/java/org/springframework/cloud/configuration/CompatibilityVerifierProperties.java b/spring-cloud-commons/src/main/java/org/springframework/cloud/configuration/CompatibilityVerifierProperties.java index 97ae7d2df..a5663ab7a 100644 --- a/spring-cloud-commons/src/main/java/org/springframework/cloud/configuration/CompatibilityVerifierProperties.java +++ b/spring-cloud-commons/src/main/java/org/springframework/cloud/configuration/CompatibilityVerifierProperties.java @@ -34,9 +34,9 @@ public class CompatibilityVerifierProperties { /** * Default accepted versions for the Spring Boot dependency. You can set {@code x} for * the patch version if you don't want to specify a concrete value. Example: - * {@code 3.4.x} + * {@code 3.5.x} */ - private List compatibleBootVersions = List.of("3.4.x"); + private List compatibleBootVersions = List.of("3.5.x"); public boolean isEnabled() { return this.enabled; diff --git a/spring-cloud-commons/src/main/java/org/springframework/cloud/configuration/SpringBootVersionVerifier.java b/spring-cloud-commons/src/main/java/org/springframework/cloud/configuration/SpringBootVersionVerifier.java index 6da9c9bfc..900eca885 100644 --- a/spring-cloud-commons/src/main/java/org/springframework/cloud/configuration/SpringBootVersionVerifier.java +++ b/spring-cloud-commons/src/main/java/org/springframework/cloud/configuration/SpringBootVersionVerifier.java @@ -35,7 +35,7 @@ class SpringBootVersionVerifier implements CompatibilityVerifier { final Map ACCEPTED_VERSIONS = new HashMap<>() { { - this.put("3.4", is3_4()); + this.put("3.5", is3_5()); } }; @@ -70,23 +70,23 @@ String getVersionFromManifest() { return SpringBootVersion.getVersion(); } - CompatibilityPredicate is3_4() { + CompatibilityPredicate is3_5() { return new CompatibilityPredicate() { @Override public String toString() { - return "Predicate for Boot 3.4"; + return "Predicate for Boot 3.5"; } @Override public boolean isCompatible() { - try { - Class.forName("org.springframework.boot.autoconfigure.web.client.RestClientSsl"); - return true; - } - catch (ClassNotFoundException e) { - return false; - } + // try { + // Class.forName("org.springframework.boot.autoconfigure.web.client.RestClientSsl"); + return true; + // } + // catch (ClassNotFoundException e) { + // return false; + // } } }; } diff --git a/spring-cloud-commons/src/test/java/org/springframework/cloud/configuration/SpringBootDependencyTests.java b/spring-cloud-commons/src/test/java/org/springframework/cloud/configuration/SpringBootDependencyTests.java index cef25841d..825ddc6a2 100644 --- a/spring-cloud-commons/src/test/java/org/springframework/cloud/configuration/SpringBootDependencyTests.java +++ b/spring-cloud-commons/src/test/java/org/springframework/cloud/configuration/SpringBootDependencyTests.java @@ -176,8 +176,8 @@ String getVersionFromManifest() { @Test public void should_match_against_current_manifest() { try { - verifyCurrentVersionFromManifest("3.4"); - verifyCurrentVersionFromManifest("3.4.x"); + verifyCurrentVersionFromManifest("3.5"); + verifyCurrentVersionFromManifest("3.5.x"); } catch (AssertionError e) { // if (e.getMessage() != null && e.getMessage().contains("3.3.")) { @@ -212,7 +212,7 @@ String getVersionFromManifest() { } }; versionVerifier.ACCEPTED_VERSIONS.clear(); - versionVerifier.ACCEPTED_VERSIONS.put("3.0", versionVerifier.is3_4()); + versionVerifier.ACCEPTED_VERSIONS.put("3.0", versionVerifier.is3_5()); VerificationResult verificationResult = versionVerifier.verify(); @@ -230,7 +230,7 @@ String getVersionFromManifest() { } }; versionVerifier.ACCEPTED_VERSIONS.clear(); - versionVerifier.ACCEPTED_VERSIONS.put("3.0", versionVerifier.is3_4()); + versionVerifier.ACCEPTED_VERSIONS.put("3.0", versionVerifier.is3_5()); VerificationResult verificationResult = versionVerifier.verify();