On Fri, 14 Nov 2025 21:59:00 GMT, Chen Liang <[email protected]> wrote:

>> jengebr has updated the pull request incrementally with one additional 
>> commit since the last revision:
>> 
>>   Polishing test and benchmark
>
> src/java.base/share/classes/java/util/Collections.java line 5264:
> 
>> 5262:         public <T> T[] toArray(T[] a) {
>> 5263:             if (a.length < 1)
>> 5264:                 a = 
>> (T[])java.lang.reflect.Array.newInstance(a.getClass().getComponentType(), 1);
> 
> Suggestion:
> 
>                 a = (T[]) Array.newInstance(a.getClass().getComponentType(), 
> 1);

Fixed

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

PR Review Comment: https://git.openjdk.org/jdk/pull/28116#discussion_r2534565967

Reply via email to