RFR: 8262913: KlassFactory::create_from_stream should never return NULL [v2]
Coleen Phillimore
coleenp at openjdk.java.net
Wed Mar 10 14:25:08 UTC 2021
On Wed, 10 Mar 2021 14:14:26 GMT, Coleen Phillimore <coleenp at openjdk.org> wrote:
>> 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.
I think this was supposed to be SimpleLoader.getResourceAsStream(name + ".class").readAllBytes();
-------------
PR: https://git.openjdk.java.net/jdk/pull/2892
More information about the hotspot-dev
mailing list