Merge remote-tracking branch 'origin/3.0.x'
This commit is contained in:
@@ -16,12 +16,14 @@
|
||||
|
||||
package org.springframework.cloud.configuration;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* Exception thrown when the current setup is not compatible.
|
||||
*
|
||||
* @author Marcin Grzejszczak
|
||||
* @author Olga Maciaszek-Sharma
|
||||
* @since 1.3.6
|
||||
*/
|
||||
class CompatibilityNotMetException extends RuntimeException {
|
||||
@@ -29,6 +31,7 @@ class CompatibilityNotMetException extends RuntimeException {
|
||||
final List<VerificationResult> results;
|
||||
|
||||
CompatibilityNotMetException(List<VerificationResult> results) {
|
||||
super("Spring Cloud/ Spring Boot version compatibility checks have failed: " + Arrays.toString(results.toArray()));
|
||||
this.results = results;
|
||||
}
|
||||
|
||||
|
||||
@@ -16,10 +16,14 @@
|
||||
|
||||
package org.springframework.cloud.configuration;
|
||||
|
||||
import java.util.Objects;
|
||||
|
||||
import org.springframework.core.style.ToStringCreator;
|
||||
import org.springframework.util.StringUtils;
|
||||
|
||||
/**
|
||||
* @author Marcin Grzejszczak
|
||||
* @author Olga Maciaszek-Sharma
|
||||
*/
|
||||
final class VerificationResult {
|
||||
|
||||
@@ -51,4 +55,29 @@ final class VerificationResult {
|
||||
return StringUtils.hasText(this.description) || StringUtils.hasText(this.action);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean equals(Object o) {
|
||||
if (this == o) {
|
||||
return true;
|
||||
}
|
||||
if (!(o instanceof VerificationResult)) {
|
||||
return false;
|
||||
}
|
||||
VerificationResult that = (VerificationResult) o;
|
||||
return description.equals(that.description) && action.equals(that.action);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return Objects.hash(description, action);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
ToStringCreator toStringCreator = new ToStringCreator(this);
|
||||
toStringCreator.append("description", description);
|
||||
toStringCreator.append("action", action);
|
||||
return toStringCreator.toString();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user