RFR: 8308753: Class-File API transition to Preview [v32]

Per Minborg pminborg at openjdk.org
Wed Nov 29 08:49:28 UTC 2023


On Tue, 28 Nov 2023 13:03:48 GMT, Adam Sotona <asotona at openjdk.org> wrote:

>> src/java.base/share/classes/java/lang/classfile/ClassFile.java line 1404:
>> 
>>> (failed to retrieve contents of file, check the PR for context)
>> Is there a more scalable way to express the major class version? The current approach means we have to add two fields per year.  Maybe a lookup function would be better?
>
> This is explicit list of supported class file versions, so I don't see any other way.

Would it not be possible to expose an immutable `Map<Integer, Integer>` that maps from Java version to major class version?

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

PR Review Comment: https://git.openjdk.org/jdk/pull/15706#discussion_r1408941961


More information about the build-dev mailing list