8345319: Fix the tag type in PoolEntry and AnnotationValue

Reviewed-by: asotona
This commit is contained in:
Chen Liang 2024-12-03 16:59:57 +00:00
parent e9f6ba0526
commit 76e874c08e
7 changed files with 46 additions and 43 deletions

View file

@ -456,9 +456,11 @@ public sealed interface AnnotationValue {
*
* @apiNote
* {@code TAG_}-prefixed constants in this class, such as {@link #TAG_INT},
* describe the possible return values of this method.
* describe the possible return values of this method. The return type is
* {@code int} for consistency with union indicator items in other union
* structures in the {@code class} file format.
*/
char tag();
int tag();
/**
* {@return an enum value for an element-value pair}

View file

@ -98,7 +98,7 @@ public sealed interface PoolEntry
* {@code TAG_}-prefixed constants in this class, such as {@link #TAG_UTF8},
* describe the possible return values of this method.
*/
byte tag();
int tag();
/**
* {@return the index within the constant pool corresponding to this entry}