On Tue, 28 Nov 2023 13:03:48 GMT, Adam Sotona <asot...@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

Reply via email to