JDK-8304918 : Remove unused decl field from AnnotatedType implementations
  • Type: Enhancement
  • Component: core-libs
  • Sub-Component: java.lang:reflect
  • Affected Version: 21
  • Priority: P4
  • Status: Resolved
  • Resolution: Fixed
  • Submitted: 2023-03-25
  • Updated: 2023-05-01
  • Resolved: 2023-04-25
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 21
21 b20Fixed
Related Reports
Relates :  
Description
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.
Comments
Changeset: adf62feb Author: Chen Liang <liach@openjdk.org> Committer: Joe Darcy <darcy@openjdk.org> Date: 2023-04-25 23:24:08 +0000 URL: https://git.openjdk.org/jdk/commit/adf62febe6ccfd0b433588fe93fb6903848effbb
25-04-2023

A pull request was submitted for review. URL: https://git.openjdk.org/jdk/pull/13183 Date: 2023-03-25 05:52:44 +0000
25-03-2023