On Wed, 13 Mar 2024 04:36:26 GMT, Serguei Spitsyn <sspit...@openjdk.org> wrote:
> It is interesting that if an invisible attribute of a `RecordComponent` was > not ignored because the `PreserveAllAnnotations` is enabled then it the > `JvmtiClassFileReconstituter` treats it as a visible attribute. Not sure, if > we should treat it as a bug. Yes, if PreserveAllAnnotations is enabled, in the reconstituted class file the annotations become visible. I suppose this is considered normal because effectively PreserveAllAnnotations makes annotations "visible" (i.e.VM sees them). But we have an issue here. if PreserveAllAnnotations is enabled and class has only RuntimeInvisibleAnnotations (no RuntimeVisibleAnnotations), the class constant pool does not contain "RuntimeVisibleAnnotations" and JvmtiClassFileReconstituter fails. I'll file a separate issue for this. ------------- PR Comment: https://git.openjdk.org/jdk/pull/18161#issuecomment-1996075217