RFR: 8294982: Implementation of Classfile API [v15]

Adam Sotona asotona at openjdk.org
Fri Feb 10 11:15:01 UTC 2023


On Thu, 9 Feb 2023 13:03:46 GMT, Maurizio Cimadamore <mcimadamore at openjdk.org> wrote:

>> Adam Sotona has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   AttributeElement.Kind removal (#48)
>
> src/java.base/share/classes/jdk/internal/classfile/constantpool/AnnotationConstantValueEntry.java line 33:
> 
>> 31:  * which includes the four kinds of primitive constants, and UTF8 constants.
>> 32:  */
>> 33: public sealed interface AnnotationConstantValueEntry extends PoolEntry
> 
> Should this extend LoadableConstantEntry (and restrict it more) ?

`LoadableConstantEntry` and `AnnotationConstantValueEntry` are just partially overlapping according to the spec.
The biggest difference (and source of confusion) is that `StringEntry` is `LoadableConstantEntry`, however not `AnnotationConstantValueEntry` and `Utf8Entry` is `AnnotationConstantValueEntry`, however not `LoadableConstantEntry`.

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

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


More information about the core-libs-dev mailing list