Skip to content

Commit

Permalink
Merge pull request #41397 from gsmet/do-not-read-manifest-for-meta-inf
Browse files Browse the repository at this point in the history
Do not check for multi-release jar when reading files from META-INF
  • Loading branch information
gsmet authored Jun 25, 2024
2 parents 36d6864 + f3fe247 commit 39dd3b2
Showing 1 changed file with 6 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,8 @@

public abstract class PathTreeWithManifest implements PathTree {

private static final String META_INF_VERSIONS = "META-INF/versions/";
private static final String META_INF = "META-INF/";
private static final String META_INF_VERSIONS = META_INF + "versions/";
public static final int JAVA_VERSION;

static {
Expand Down Expand Up @@ -136,6 +137,10 @@ protected void initMultiReleaseMapping(final Map<String, String> mrMapping) {
}

protected String toMultiReleaseRelativePath(String relativePath) {
if (relativePath.startsWith(META_INF)) {
return relativePath;
}

return getMultiReleaseMapping().getOrDefault(relativePath, relativePath);
}

Expand Down

0 comments on commit 39dd3b2

Please sign in to comment.