Sat, 02 Nov 2024 14:23:45 +0100
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 + "'."); }