RFR: 8334714: Class-File API leaves preview [v2]

xxDark duke at openjdk.org
Sat Aug 24 05:07:03 UTC 2024


On Sat, 24 Aug 2024 04:56:34 GMT, Chen Liang <liach at openjdk.org> wrote:

> 
> Indeed, it would be a good RFE to allow users to override default attribute mappers to parse attributes; this would be extremely useful if users wish to support previous previews that only differed in the attribute formats.
> 
I don't think at this point in time there would be any change in the format of any existing attributes, as that would be a binary incompatible change.
But yes, having a way to override parsing of builtin attributes would be nice.

> For the behavioral inconsistencies, we can backport this special handling removal to active jdk update projects or even request specification changes on LTS versions (see https://github.com/openjdk/jdk8u-ri) if this is deemed important enough.

I don't think that many projects use pre-Java 1 format at this point. While I saw some libraries that kept their version set to versions like Java 4 for no apparent reason... Hey, at least it's not Java 1 version.
If Hotspot now parses these files incorrectly, it might be worth to just throw `UnsupportedClassVersionError` for oak class files?

-------------

PR Comment: https://git.openjdk.org/jdk/pull/19826#issuecomment-2308102351


More information about the compiler-dev mailing list