Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

jclMin22.jar contains classes compiled against Java 21 #2912

Merged
merged 2 commits into from
Sep 5, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file modified org.eclipse.jdt.core.tests.model/JCL/jclMin22.jar
Binary file not shown.
2 changes: 1 addition & 1 deletion org.eclipse.jdt.core.tests.model/META-INF/MANIFEST.MF
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: %pluginName
Bundle-SymbolicName: org.eclipse.jdt.core.tests.model;singleton:=true
Bundle-Version: 3.13.100.qualifier
Bundle-Version: 3.13.200.qualifier
Bundle-Vendor: %providerName
Bundle-Localization: plugin
Export-Package: org.eclipse.jdt.core.tests,
Expand Down
2 changes: 1 addition & 1 deletion org.eclipse.jdt.core.tests.model/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
<relativePath>../tests-pom/</relativePath>
</parent>
<artifactId>org.eclipse.jdt.core.tests.model</artifactId>
<version>3.13.100-SNAPSHOT</version>
<version>3.13.200-SNAPSHOT</version>
<packaging>eclipse-test-plugin</packaging>

<properties>
Expand Down
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
Loading