Skip to content

Commit

Permalink
Include JDK 24ea in CI
Browse files Browse the repository at this point in the history
  • Loading branch information
slachiewicz committed Dec 25, 2024
1 parent 07f5cb0 commit 47b5c79
Show file tree
Hide file tree
Showing 4 changed files with 32 additions and 26 deletions.
4 changes: 4 additions & 0 deletions .github/workflows/maven.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,10 @@ jobs:
uses: codehaus-plexus/.github/.github/workflows/maven.yml@master
with:
matrix-exclude: '[ {"jdk": "8"}, {"jdk": "11"}, {"jdk": "23", distribution: "microsoft" } ]'
matrix-include: >
[
{"jdk": "24-ea", "os": "ubuntu-latest", distribution: "temurin" }
]
jdk-distribution-matrix: '["zulu", "temurin", "microsoft", "liberica", "corretto"]'
maven_args: 'verify javadoc:javadoc -e -B -V -fae'

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@ protected int expectedWarnings() {
|| javaVersion.contains("22")
|| javaVersion.contains("23")) {
return 5;
} else if (javaVersion.contains("24")) {
return 4;
}
return 2;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,8 @@ protected int expectedErrors() {
|| javaVersion.contains("20")
|| javaVersion.contains("21")
|| javaVersion.contains("22")
|| javaVersion.contains("23")) {
|| javaVersion.contains("23")
|| javaVersion.contains("24")) {
return 5;
}
// javac output changed for misspelled modifiers starting in 1.6...they now generate 2 errors per occurrence,
Expand All @@ -96,7 +97,8 @@ protected int expectedWarnings() {
|| javaVersion.contains("20")
|| javaVersion.contains("21")
|| javaVersion.contains("22")
|| javaVersion.contains("23")) {
|| javaVersion.contains("23")
|| javaVersion.contains("24")) {
return 1;
}
if (javaVersion.contains("1.8")) {
Expand Down Expand Up @@ -151,6 +153,9 @@ public String getTargetVersion() {
if (javaVersion.contains("23")) {
return "23";
}
if (javaVersion.contains("24")) {
return "24";
}
return super.getTargetVersion();
}

Expand All @@ -159,39 +164,30 @@ public String getSourceVersion() {
String javaVersion = getJavaVersion();
if (javaVersion.contains("9.0")) {
return "1.7";
}
if (javaVersion.contains("11")) {
} else if (javaVersion.contains("11")) {
return "11";
}
if (javaVersion.contains("14")) {
} else if (javaVersion.contains("14")) {
return "14";
}
if (javaVersion.contains("15")) {
} else if (javaVersion.contains("15")) {
return "15";
}
if (javaVersion.contains("16")) {
} else if (javaVersion.contains("16")) {
return "16";
}
if (javaVersion.contains("17")) {
} else if (javaVersion.contains("17")) {
return "17";
}
if (javaVersion.contains("18")) {
} else if (javaVersion.contains("18")) {
return "18";
}
if (javaVersion.contains("19")) {
} else if (javaVersion.contains("19")) {
return "19";
}
if (javaVersion.contains("20")) {
} else if (javaVersion.contains("20")) {
return "20";
}
if (javaVersion.contains("21")) {
} else if (javaVersion.contains("21")) {
return "21";
}
if (javaVersion.contains("22")) {
} else if (javaVersion.contains("22")) {
return "22";
}
if (javaVersion.contains("23")) {
} else if (javaVersion.contains("23")) {
return "23";
} else if (javaVersion.contains("24")) {
return "24";
}
return super.getTargetVersion();
}
Expand All @@ -210,7 +206,8 @@ protected Collection<String> expectedOutputFiles() {
|| javaVersion.contains("20")
|| javaVersion.contains("21")
|| javaVersion.contains("22")
|| javaVersion.contains("23")) {
|| javaVersion.contains("23")
|| javaVersion.contains("24")) {
return Arrays.asList(
"org/codehaus/foo/Deprecation.class",
"org/codehaus/foo/ExternalDeps.class",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,10 @@ public class JavaxToolsCompilerTest extends AbstractJavacCompilerTest {
@Override
protected int expectedWarnings() {
String javaVersion = getJavaVersion();
if (javaVersion.contains("21") || javaVersion.contains("22") || javaVersion.contains("23")) {
if (javaVersion.contains("21")
|| javaVersion.contains("22")
|| javaVersion.contains("23")
|| javaVersion.contains("24")) {
return 1;
} else {
return super.expectedWarnings();
Expand Down

0 comments on commit 47b5c79

Please sign in to comment.