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:
@@ -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() {
|
||||
|
||||
@@ -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");
|
||||
|
||||
Reference in New Issue
Block a user