RFR: 8262913: KlassFactory::create_from_stream should never return NULL [v2]

Coleen Phillimore coleenp at openjdk.java.net
Wed Mar 10 14:21:11 UTC 2021


On Wed, 10 Mar 2021 01:35:00 GMT, Ioi Lam <iklam at openjdk.org> wrote:

>> Coleen Phillimore has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   Replace equals with contains, suggested by hseigel.
>
> One small nit about the test code. The rest looks good to me.

Thanks Harold and Ioi for the code reviews.

> test/hotspot/jtreg/runtime/DefineClass/NullClassBytesTest.java line 73:
> 
>> 71:         }
>> 72: 
>> 73:         byte[] getClassData(String name) {
> 
> This function can be simplified to something like
> 
> return SimpleLoader.class.getClassLoader().getResourceAsStream(name + ".class").readAllBytes();
> 
> That way it will be more resilient if jtreg wants to put the classfile elsewhere.

I like this suggestion!  We should file an RFE to fix all the tests that have this getClassData function.

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

PR: https://git.openjdk.java.net/jdk/pull/2892


More information about the hotspot-dev mailing list