fix incorrect compatibility check for major versions default tip

Sat, 02 Nov 2024 14:23:45 +0100

author
Mike Becker <universe@uap-core.de>
date
Sat, 02 Nov 2024 14:23:45 +0100
changeset 121
155cd224b51d
parent 120
0e3827ebc6e4

fix incorrect compatibility check for major versions

src/main/java/de/unixwork/uwproj/CompatibilityCheck.java file | annotate | diff | comparison | revisions
--- a/src/main/java/de/unixwork/uwproj/CompatibilityCheck.java	Sat Nov 02 14:22:05 2024 +0100
+++ b/src/main/java/de/unixwork/uwproj/CompatibilityCheck.java	Sat Nov 02 14:23:45 2024 +0100
@@ -21,7 +21,7 @@
     public static void check(String expected, String actual) throws CompatibilityException {
         final var expectedVer = versionParts(expected);
         final var actualVer = versionParts(actual);
-        if (expectedVer[0] > actualVer[0] || expectedVer[1] > actualVer[1]) {
+        if (expectedVer[0] != actualVer[0] || expectedVer[1] > actualVer[1]) {
             if (actual.isBlank()) actual = "unspecified";
             throw new CompatibilityException("Expected project file version '" + expected + "' but got '" + actual + "'.");
         }

mercurial