Review Request: Add ClassOption.STRONG and default is unspecified

Mandy Chung mandy.chung at oracle.com
Fri Mar 13 22:37:45 UTC 2020



On 3/13/20 9:09 AM, Alex Buckley wrote:
> On 3/12/2020 5:43 PM, John Rose wrote:
>> After “doing the math” (in the previous note) I’m with David being
>> skeptical of “unspecified”.  If a JVM implementation maps
>> “unspecified” to STRONG that’s a bug, not a feature ... Only WEAK
>> mode is safe.  So the best we could do is say that “if neither option
>> is specified, then the mode defaults to WEAK”.  But at that point,
>> why have WEAK at all? You only need the token for the non-default
>> setting.
>
> Got it: (i) the default is specified to be WEAK; (ii) the API offers a 
> single enum constant, STRONG, to override the default; (iii) both of 
> the previous clauses apply to hidden classes that are nestmates AND to 
> hidden classes that are not nestmates. Thanks for the enjoyable writeup.
>

Please take a look the `Lookup::defineHiddenClass` spec and `ClassOption`:
http://cr.openjdk.java.net/~mchung/valhalla/webrevs/hidden-classes/weak-strong-class/

Thanks
Mandy


More information about the valhalla-dev mailing list