boot version validation logic now works with a list of releases that contain all releases instead of the latest one only

This commit is contained in:
Martin Lippert
2022-11-27 18:24:50 +01:00
parent e4a2ee7905
commit 5a07559000
4 changed files with 200 additions and 32 deletions

View File

@@ -10,6 +10,8 @@
*******************************************************************************/
package org.springframework.ide.vscode.commons.java;
import java.util.Objects;
public final class Version implements Comparable<Version> {
private int major;
@@ -74,6 +76,24 @@ public final class Version implements Comparable<Version> {
} else {
return major - o.major;
}
}
}
@Override
public int hashCode() {
return Objects.hash(major, minor, patch, qualifier);
}
@Override
public boolean equals(Object obj) {
if (this == obj)
return true;
if (obj == null)
return false;
if (getClass() != obj.getClass())
return false;
Version other = (Version) obj;
return major == other.major && minor == other.minor && patch == other.patch
&& Objects.equals(qualifier, other.qualifier);
}
}