Updates to use new boot 3 class in version verifier.
This commit is contained in:
@@ -80,14 +80,16 @@ class SpringBootVersionVerifier implements CompatibilityVerifier {
|
||||
|
||||
@Override
|
||||
public boolean isCompatible() {
|
||||
// try {
|
||||
// since 3.0
|
||||
// FIXME: find class or method in boot that is new in 3.0
|
||||
// Class.forName("org.springframework.boot.autoconfigure.data.redis.ClientResourcesBuilderCustomizer");
|
||||
return true;
|
||||
/*
|
||||
* } catch (ClassNotFoundException e) { return false; }
|
||||
*/
|
||||
try {
|
||||
// since 3.0
|
||||
Class.forName(
|
||||
"org.springframework.boot.context.properties.ConfigurationPropertiesBindConstructorProvider");
|
||||
return true;
|
||||
|
||||
}
|
||||
catch (ClassNotFoundException e) {
|
||||
return false;
|
||||
}
|
||||
|
||||
}
|
||||
};
|
||||
|
||||
@@ -175,20 +175,8 @@ public class SpringBootDependencyTests {
|
||||
|
||||
@Test
|
||||
public void should_match_against_current_manifest() {
|
||||
try {
|
||||
verifyCurrentVersionFromManifest("3.0");
|
||||
verifyCurrentVersionFromManifest("3.0.x");
|
||||
}
|
||||
catch (AssertionError e) {
|
||||
if (e.getMessage() != null && e.getMessage().contains("2.7.")) {
|
||||
// we're likely running a boot 2.7 compatibility test, try 2.7
|
||||
verifyCurrentVersionFromManifest("2.7");
|
||||
verifyCurrentVersionFromManifest("2.7.x");
|
||||
}
|
||||
else {
|
||||
throw e;
|
||||
}
|
||||
}
|
||||
verifyCurrentVersionFromManifest("3.0");
|
||||
verifyCurrentVersionFromManifest("3.0.x");
|
||||
}
|
||||
|
||||
private void verifyCurrentVersionFromManifest(String version) {
|
||||
|
||||
Reference in New Issue
Block a user