On Sat, 25 Mar 2023 05:52:44 GMT, Chen Liang <li...@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.

Thanks Joe Darcy. This will simplify another patch I am working on to fix some 
annotation mismatches within reflection.

In addition, `TypeAnnotation` has a `baseDecl` field that only serves for a 
momentary appearance in `toString`. Should that be removed as well?

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

PR Comment: https://git.openjdk.org/jdk/pull/13183#issuecomment-1522529351

Reply via email to