Compatibility check if Spring Boot version is unknown

It is better not to fail the compatibility check if the Spring Boot version is unknown.
This commit is contained in:
Dave Syer
2020-09-07 08:59:54 +01:00
committed by spencergibb
parent 5f92501a0d
commit f7360b05ad
2 changed files with 7 additions and 4 deletions

View File

@@ -87,8 +87,11 @@ class SpringBootVersionVerifier implements CompatibilityVerifier {
if (log.isDebugEnabled()) {
log.debug("Version found in Boot manifest [" + version + "]");
}
return StringUtils.hasText(version)
&& version.startsWith(stripWildCardFromVersion(s));
if (!StringUtils.hasText(version)) {
log.info("Cannot check Boot version");
return true;
}
return version.startsWith(stripWildCardFromVersion(s));
}
String getVersionFromManifest() {

View File

@@ -132,7 +132,7 @@ public class SpringBootDependencyTests {
acceptedVersions) {
@Override
String getVersionFromManifest() {
return "";
return "2.1";
}
};
versionVerifier.ACCEPTED_VERSIONS.clear();
@@ -207,7 +207,7 @@ public class SpringBootDependencyTests {
acceptedVersions) {
@Override
String getVersionFromManifest() {
return "";
return "2.0";
}
};
versionVerifier.ACCEPTED_VERSIONS.remove("2.1");