Question/discussion how to resolve 8196371, 4271239, 4935610, and 6910466 about missing manifest version in Attributes#writeMain
Philipp Kunz
philipp.kunz at paratix.ch
Sun May 13 21:00:29 UTC 2018
Hi,
Bugs 8196371, 4271239, 4935610, and 6910466 all are about manifests with
no version.
Which approach would be preferable?
0) leave the impl as is - close with resolution won't fix
1) assume a version automatically if not explicitly set (suggested in
6910466 and 4271239)
2) throw an exception in JarOutputStream (suggested in 6910466)
3) throw an exception in Manifest#write (suggested in 4935610 and 4271239)
4) issue warning (suggested in 4935610)
5) output manifest without version (suggested in 4271239 and voted
against in 6294255)
desirable would be
a) that existing code continues to work flawlessly,
b) that no invalid manifests can be produced, and
c) notifying missing version at the earliest time possible
Spontaneously, I'd go for a default value for the version (option 1).
Additionally, a warning could also be issued when assuming the default
version (option 4). I figure that very few manifests have been in use
that have no version because that would have been detected due to
missing main attributes. Therefore, I guess it can be assumed that a
default version would not lead to expect breaking a lot of existing
applications though strictly possible. The default version would be the
Manifest-Version and not the Signature-Version header but what would be
an appropriate default manifest version value? "1.0", or maybe just "0"?
I merely collected the available information so far and would not be
surprised if I'd missed another approach, option, or objective. Any
suggestion or other idea?
I'm still a new contributor to the open jdk and would be glad also to
get suggestions about how to appropriately inquire such topics or if I'm
just going too far and asking for too much or if it's just not important
or urgent enough or how to proceed or anything else whatever. As I
understand someone will have to sponsor the change if there will be any.
Is there any chance to find one or is that too early?
Regards,
Philipp
More information about the core-libs-dev
mailing list