RFR: 8304918: Remove unused decl field from AnnotatedType implementations

Joe Darcy darcy at openjdk.org
Tue Apr 25 22:49:36 UTC 2023


On Sat, 25 Mar 2023 05:52:44 GMT, Chen Liang <liach at openjdk.org> wrote:

> In `AnnotatedTypeBaseImpl`, a `decl` field is declared, referring to the declaration that the AnnotatedType is from. However, this field is not used anywhere except passing to constructors of other implementations; it's not used in debug messages (unlike in `TypeAnnotation`), not involved in equality checks. Since these implementations are not serializable, we can safely remove the decl field from the implementations. All 1048 java/lang tests pass on my machine.

Marked as reviewed by darcy (Reviewer).

Catching up on reviews, doing a quick skim over the history, lack of use of the field seems to be present from the original work done under JDK-8004698 in JDK 8.

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

PR Review: https://git.openjdk.org/jdk/pull/13183#pullrequestreview-1400856774
PR Comment: https://git.openjdk.org/jdk/pull/13183#issuecomment-1522504694


More information about the core-libs-dev mailing list