Withdrawn: 8335927: Revisit AnnotationConstantValueEntry and AnnotationValue.OfConstant

Chen Liang liach at openjdk.org
Thu Aug 1 23:07:35 UTC 2024


On Sun, 14 Jul 2024 22:30:43 GMT, Chen Liang <liach at openjdk.org> wrote:

> Remove `AnnotationConstantValueEntry` and `AnnotationValue.OfConstant`.
> 
> This is a relic of the old model from https://github.com/openjdk/jdk-sandbox/commit/bb7e29474ecfcfbd1eb01d237593eb80d062944f. In addition, this is bug-prone: the byte, short, char, and boolean constants use the int entry, and getting the `ConstantDesc` for them will return an `Integer`, which cannot be inversed back into the respective annotation values via `AnnotationValue.of(Object)` factory.

This pull request has been closed without being integrated.

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

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


More information about the compiler-dev mailing list