On Thu, 29 Aug 2024 14:57:10 GMT, Chen Liang <li...@openjdk.org> wrote:

> Many constants are cluttered in `ClassFile`. However, only a few of them are 
> ever used by regular users, most notably `ACC_` flags and `JAVA_X_VERSION` 
> constants. All other constants are specific and should live in more local 
> locations, such as getters that return these constants.
> 
> This simplification of `ClassFile` constants improves user onramp to the 
> Class-File API.
> 
> Notably, before, if `ClassFile` is static imported, `Opcode` enums must be 
> qualified due to name clashes; this relocation allows `Opcode` enums to be 
> static imported with `ACC_` flags, improving class file writing user 
> experience.

This pull request has now been integrated.

Changeset: 8c8f0d85
Author:    Chen Liang <li...@openjdk.org>
URL:       
https://git.openjdk.org/jdk/commit/8c8f0d85ce30e45c34d4b096f7f1430cd9e7fd70
Stats:     2458 lines in 37 files changed: 542 ins; 913 del; 1003 mod

8339260: Move rarely used constants out of ClassFile

Reviewed-by: asotona

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

PR: https://git.openjdk.org/jdk/pull/20773

Reply via email to