On Sun, 12 Oct 2025 07:12:49 GMT, Alan Bateman <[email protected]> wrote:

>> Xueming Shen has updated the pull request incrementally with one additional 
>> commit since the last revision:
>> 
>>   test case update
>
> test/jdk/java/lang/ClassLoader/defineClass/DefineClassDirectByteBuffer.java 
> line 192:
> 
>> 190:     @MethodSource("bufferTypes")
>> 191:     void testDefineClassWithCustomLoaderByteBuffer(int type, boolean 
>> readonly, int pos, boolean posAtLimit)
>> 192:             throws Exception
> 
> Have you tried changing the method source to create a stream of the 
> ByteBuffers to test? 
> 
> In the current version we need to add to bufferTypes(), 
> getByteBufferWithTestClassBytes(), and maybe adding a new constant, in order 
> to add a new buffer to test. I suspect it would be a lot simpler if method 
> source created all the buffers (including the read-only buffers), and 
> testDefineClassWithCustomLoaderByteBuffer just tests defineClass with that BB.

Just tried to make the test code less verbose / repetitive :-) Updated 
accordingly.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/27569#discussion_r2425109714

Reply via email to