RFR(S): 8075253: Multiversion JAR feature: CDS does not support MV-JARs
Steve Drach
steve.drach at oracle.com
Sat Mar 19 18:02:08 UTC 2016
Yes, it’s a bug. I’m currently working on another bug that requires me to change manifest processing. It will be case insensitive.
> On Mar 19, 2016, at 10:24 AM, Calvin Cheung <calvin.cheung at oracle.com> wrote:
>
>
>
> On 3/19/16, 12:41 AM, Alan Bateman wrote:
>>
>>
>> On 18/03/2016 23:38, Claes Redestad wrote:
>>> Hi,
>>>
>>> sorry for being a bit out of the loop, but according to the most recent published spec[1] I could find the manifest attribute names needs to be treated case-insensitively. Has JEP-238 made necessary specification updates to allow deviation from this rule for new attribute names?
>> Good point, attributes names have always been case insensitive. I don't recall anything in JEP 238 that proposes otherwise.
>
> Currently, the jdk code only honors "Multi-Release" as the attribute name for multi-release jar.
>
> I ran the following test: jdk/test/jdk/nio/zipfs/MultiReleaseJarTest.java
>
> It created a multi-release.jar.
> Running the jar file manually:
> java -cp ./multi-release.jar version.Main
> gives the following output:
> I am running on version 9
>
> Then, I expanded the jar file and modified the manifest entry from "Multi-Release" to "multi-Release" and created another jar file.
> Running the new jar file shows:
> I am running on version 8
>
> The code in JarFileSystem.java seems to confirm my findings:
>
> private boolean isMultiReleaseJar() {
> try (InputStream is = newInputStream(getBytes("META-INF/MANIFEST.MF"))) {
> return (new Manifest(is)).getMainAttributes()
> .containsKey(new Attributes.Name("Multi-Release"));
> // fixme change line above after JarFile integration to contain Attributes.Name.MULTI_RELEASE
> } catch (IOException x) {
> return false;
> }
> }
>
> To be consistent, I think hotspot should wait until jdk side has a fix to handle case insensitive "Multi-Release" attribute name.
>
> What do you think?
>
> thanks,
> Calvin
>
More information about the hotspot-runtime-dev
mailing list