RFR: 8345486: Reevaluate the classes in java.lang.classfile.components package
Chen Liang
liach at openjdk.org
Wed Dec 4 17:33:51 UTC 2024
On Wed, 4 Dec 2024 14:23:07 GMT, Chen Liang <liach at openjdk.org> wrote:
> Over the years there have been significant rounds of cleanup to try and keep the classfile API as focussed and true to its underlying functional core as possible. One of the side-effects of such cleanups was to move higher-level functionalities from the root classfile API package `java.lang.classfile` to a separate package -- `java.lang.classfile.util`, then renamed to the current `java.lang.classfile.components`.
>
> As is natural, most of the review cycles over the last few years have been spent on making sure that the functional core of the classfile API was fit for purpose, and good enough to tackle existing use cases, both within and without the JDK. A consequence of that is that the `java.lang.classfile.components` received, in comparison, relatively little reviewing attention. When we had a chance to look at this again [1], it quickly became clear that, while the functionalities provided by the classes in this package are generally useful, they have evolved in a rather ad-hoc fashion. Some functionalities, like `ClassPrinter`, are probably closer to belong to the core API than the `components` package suggests. Other functionalities (e.g. `CodeStackTracker`), seem more peripheral and, while useful, have received little to no feedback.
>
> For these reasons, and in order to deliver the best classfile API we can, we would like to buy us some time to reevaluate the classes in this package. Unfortunately, given the little time left available to make changes in Java 24, the only realistic option left available to us is to temporarily move the `java.lang.classfile.components` to an internal package (`jdk.internal.classfile.components`). While this is unfortunate, we still believe it would be a better course of action than to ship the `components` package in its current state.
>
> [1] - https://mail.openjdk.org/pipermail/classfile-api-dev/2024-December/000613.html
Tier 1-5 test results look good. Integrating early to help prepare for the 24 stabilization branch-off.
-------------
PR Comment: https://git.openjdk.org/jdk/pull/22544#issuecomment-2518096015
More information about the build-dev
mailing list