On Thu, 27 Jul 2023 16:16:37 GMT, Ashutosh Mehra <d...@openjdk.org> wrote:

>> We need to be sure this works as expected for top-level classes that have no 
>> nest members, and deeply nested nest members, plus dynamically injected 
>> hidden classes that are nest members. I'm unclear if this is intended to 
>> only expose the same details as would be statically defined in the attribute 
>> in the classfile?
>
> @dholmes-ora sorry for responding late. I got sidetracked by some other work.
> 
>> We need to be sure this works as expected for top-level classes that have no 
>> nest members, and deeply nested nest members, plus dynamically injected 
>> hidden classes that are nest members.
> 
> I am not sure I understand this concern. We are getting nest-host and 
> nest-members from the InstanceKlass. As long as this information is recorded 
> in InstanceKlass, it would work. Can you please elaborate your concern about 
> the cases you feel may not work.
> 
>> I'm unclear if this is intended to only expose the same details as would be 
>> statically defined in the attribute in the classfile?
> 
> It is to expose the details as the JVM sees, which may be different from what 
> is statically defined in the classfile if agents are involved.

@ashu-mehra you indicated that you had only done two basic manual tests to 
check the output. You need to check it for the cases that I flagged too. In the 
VM every top-level class is its own nest-host, but that is not expressed in a 
classfile attribute (it is just the defined semantics) so displaying this as-if 
it were an explicit attribute may not be right.

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

PR Comment: https://git.openjdk.org/jdk/pull/15005#issuecomment-1654673306

Reply via email to