JDK-8335938 : Review XxxBuilder.original and XxxModel.parent
  • Type: Enhancement
  • Component: core-libs
  • Sub-Component: java.lang.classfile
  • Affected Version: 24
  • Priority: P4
  • Status: Resolved
  • Resolution: Fixed
  • Submitted: 2024-07-09
  • Updated: 2024-07-29
  • Resolved: 2024-07-23
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 24
24 b08Fixed
Related Reports
Blocks :  
CSR :  
Description
XxxBuilder.original method is mostly meaningless to transforms: if a transform is run alone in transformClass/Method/Field/Code, it can access the original model; otherwise, other transforms could have changed the models significantly that it's no longer associated to the original model. This API thus should be removed.

XxxModel.parent method should only return present if the model is bound. Most of the parent model access is used when analyzing a static parsed class. Transformed buffered models currently return their original model's parent (blocked by JDK-8335935), but this does not make sense that models sent to the same transform have different parents.
Comments
Changeset: 22914e07 Branch: master Author: Chen Liang <liach@openjdk.org> Date: 2024-07-23 04:59:58 +0000 URL: https://git.openjdk.org/jdk/commit/22914e0774f5bb8ded3d825bea1dc312b12d4d4a
23-07-2024

A pull request was submitted for review. Branch: master URL: https://git.openjdk.org/jdk/pull/20177 Date: 2024-07-15 00:33:51 +0000
15-07-2024