More last minute changes for the ClassFile API
Brian Goetz
brian.goetz at oracle.com
Sun Dec 1 16:24:20 UTC 2024
I have always been uncomfortable with the components package. But it is also pretty late in the cycle.
> On Dec 1, 2024, at 9:40 AM, Chen Liang <liangchenblue at gmail.com> wrote:
>
>
> Hello,
> In the week before RDP 1, I think there are still a few enhancements that require removal of existing APIs:
> 1. The components package. The utilities in this package are often inconsistent; for example, class name remapper does not remap simple names in InnerClasses; the locals shifter shifts an arbitrary number of slots. These inconsistent behaviors will have to be kept even if they make no sense in the long run, because people might have dependencies on these behaviors. I think we should move these components to example snippets for users, much like the System exit detection example in JEP 486.
> 2. The return types of PoolEntry::tag and AnnotationValue::tag. They currently return byte and char respectively while their constants are of int type. In addition, the byte tag can overflow if the constant pool tags exceed 127, and by then the default Java widening conversion would be erroneous for the constant pool tags.
>
> What do you think?
> Regards
More information about the classfile-api-dev
mailing list