Nest host validation vs NestHost attribute performed by Lookup::defineHiddenClass

Mandy Chung mandy.chung at oracle.com
Fri Sep 27 23:02:01 UTC 2019



On 9/27/19 3:46 PM, Mandy Chung wrote:
> However, if LC is accessed by other class D (not a dynamic nestmate) 
> but the  nest host has been validated, as the bad NH is thrown away, 
> then IAE should be thrown in this case. 

a typo: s/should/would/

IAE would be thrown in this case.  The steps performed are:

1. the nest host of D (H) is determined and no error.
2. the nest host of LC (LC) has been determined and bad NH ignored when 
LC::defineHiddenClass was called
3. H != LC throw IAE

This scenario is what this thread [1] originally concerns about.  LC is 
an existing ordinary class with a bad MH attribute.

For the case where another class C is accessed:

1. the nest host of D (H) is determined and no error.
2. the nest host of C (H') is determined (first time validation) and bad 
NH, NCDEF or ICCE thrown

Mandy
[1] 
https://mail.openjdk.java.net/pipermail/valhalla-dev/2019-September/006396.html 



More information about the valhalla-dev mailing list