Skip to content

Commit

Permalink
jclMin22.jar contains classes compiled against Java 21
Browse files Browse the repository at this point in the history
Re-built jclMin22.jar from jclMin22src.jar with proper project
compilation target and enabled test232816f().

Fixes eclipse-jdt#2580
  • Loading branch information
iloveeclipse committed Sep 4, 2024
1 parent 0f92fb3 commit d68aa49
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
Binary file modified org.eclipse.jdt.core.tests.model/JCL/jclMin22.jar
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,7 @@ public void setUpSuite() throws Exception {
super.setUpSuite();
setupExternalJCL("jclMin");
setupExternalJCL("jclMin1.5");
setupExternalJCL("jclMin22");
}

void restoreAutobuild(IWorkspaceDescription preferences, boolean autoBuild) throws CoreException {
Expand Down Expand Up @@ -436,7 +437,7 @@ public void test232816e() throws CoreException {
}
}

public void _2551_test232816f() throws Exception {
public void test232816f() throws Exception {

IJavaProject p = null;
try {
Expand All @@ -454,14 +455,14 @@ public void _2551_test232816f() throws Exception {
JavaCore.newLibraryEntry(getExternalJCLPath(CompilerOptions.getLatestVersion()), new Path("/P0/SBlah"), new Path("/P0"))})
},
null);
// TODO See https://github.com/eclipse-jdt/eclipse.jdt.core/issues/2580
// jclMin22.jar contains classes compiled against Java 21

IClasspathEntry newClasspath = JavaCore.newContainerEntry(new Path("container/default"));

IJavaModelStatus status = JavaConventions.validateClasspathEntry(p, newClasspath, true);
assertStatus(
"should have complained about jdk level mismatch",
"Incompatible .class files version in required binaries. Project 'P' is targeting a 1.4 runtime, but is compiled against \'" + getExternalJCLPath("1.5").makeRelative() + "' (from the container 'container/default') which requires a 1.5 runtime",
"Incompatible .class files version in required binaries. Project 'P' is targeting a " + CompilerOptions.getFirstSupportedJavaVersion()
+ " runtime, but is compiled against \'" + getExternalJCLPath("22").makeRelative() + "' (from the container 'container/default') which requires a 22 runtime",
status);
} finally {
deleteProject("P");
Expand Down

0 comments on commit d68aa49

Please sign in to comment.