On Tue, 7 Feb 2023 11:53:46 GMT, Maurizio Cimadamore <mcimadam...@openjdk.org> wrote:
>> `BootstrapMethodEntry` is not a constant pool entry, but >> `BootstrapMethodsAttribute` entry. >> It might be rather moved under `attribute` package and renamed to >> `BootstrapMethodInfo` to follow the same pattern as other attributes/infos. > > I know it's part of an attribute - but reading the javadoc: > > /** > * Models an entry in the bootstrap method table. The bootstrap method table > * is stored in the {@code BootstrapMethods} attribute, but is modeled by > * the {@link ConstantPool}, since the bootstrap method table is logically > * part of the constant pool. > */ > ``` > > And also, seeing the method: > > ``` > /** > * {@return the constant pool associated with this entry} > */ > ConstantPool constantPool(); > > > It seems like the API is doing the (justifiable) trick of making BSMs look > like if they are first-class CP entries (even if not specified that way in > the JVMLS). I think that's a fine move, but if we go down that path we should > be honest, and put this class in constantpool. At least this is my 0.02$. I see your point. The duality of `BootstrapMethodEntry` and potential confusion when moved under `attribute` or under `constantpool` package is the reason why it probably should stay where it is. However feel free to discuss it at the mailing list. Thanks. ------------- PR: https://git.openjdk.org/jdk/pull/10982