RFR 8233272 : The Class.forName specification should be updated to match the long-standing implementation with respect to class linking

Mandy Chung mandy.chung at oracle.com
Fri Nov 15 00:46:18 UTC 2019



On 11/14/19 4:42 PM, David Holmes wrote:
> On 15/11/2019 10:33 am, Brent Christian wrote:
>> On 11/14/19 4:12 PM, David Holmes wrote:
>>> On 15/11/2019 9:58 am, Brent Christian wrote:
>>>>
>>>> http://cr.openjdk.java.net/~bchristi/8233272/webrev-03/
>>>
>>> Test is fine. Just one note/clarification:
>>>
>>>   63         // Loading (but not linking) Container will succeed.
>>>
>>> Container was already loaded as part of the failing forName call, so 
>>> this second forName will just return it.
>>
>> Hmm.  I could use a different classloader instance for the second 
>> Class.forName() call.
>
> If you really want to test both positive and negative cases from a 
> clean slate then I would suggest modifying the test slightly and using 
> two @run commands - one to try to initialize and one to not.

Yes this is what I was thinking.  Two separate @run commands with an 
argument to indicate if initialize is true or false would do it.

Mandy


More information about the hotspot-dev mailing list