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

Fix jar-in-jar-loader multi-release support #1058

Merged
merged 1 commit into from Jan 23, 2024

Conversation

ppkarwasz
Copy link
Contributor

What it does

In order to open a JAR file in multi-release mode the URL of the file must be suffixed with #runtime.

Currently the rsrc: URL handler strips this fragment, which breaks multi-release JARs retrieved through the rsrc: protocol.

This PR copies the #runtime fragment from the rsrc: URL to the URL of the underlying resource.

Closes #1057.

How to test

A minimal reproducible example is available at copernik-eu/bug-reproducibility/eclipse-jar-in-jar.

I can provide a JUnit test if you point to the right module, where to put it.

Author checklist

In order to open a JAR file in multi-release mode the URL of the file
must be suffixed with `#runtime`.

Currently the `rsrc:` URL handler strips this fragment, which breaks
multi-release JARs retrieved through the `rsrc:` protocol.
@jjohnstn
Copy link
Contributor

Looks fine. There is FatJarExportTest.java which might be a candidate to add the test to.

@jjohnstn jjohnstn merged commit be9b97c into eclipse-jdt:master Jan 23, 2024
9 checks passed
@ppkarwasz ppkarwasz deleted the multi-release branch March 1, 2024 12:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

The jar-in-jar loader does not support multi-release JARs
2 participants