[8u] RFR: Backport of 8067796 (process) Process.waitFor(timeout, unit) doesn't throw NPE if timeout is less than, or equal to zero when unit == null

Andrew Haley aph at redhat.com
Tue Apr 14 09:43:50 UTC 2020


On 4/10/20 1:45 PM, Sergey Nazarkin wrote:
> Could anyone help review this patch? 
> 
> Thanks.		
> 
> /Sergey
> 
>> On Apr 5, 2020, at 22:44, Sergey Nazarkin <snazarkin at azul.com> wrote:
>>
>> Thanks, Andrew. In simpler case 8037866(Replace the Fun class in tests with lambdas)  only misses a part of MOAT.java that was introduced by 8014066(ArrayList#removeRange):
>>
>> $cat test/java/util/Collection/MOAT.java.rej
>> --- MOAT.java
>> +++ MOAT.java
>> @@ -728,8 +722,8 @@
>>         l.listIterator(0);
>>         l.listIterator(l.size());
>>         THROWS(IndexOutOfBoundsException.class,
>> -               new Fun(){void f(){l.listIterator(-1);}},
>> -               new Fun(){void f(){l.listIterator(l.size() + 1);}});
>> +               () -> l.listIterator(-1),
>> +               () -> l.listIterator(l.size() + 1));
>>
>>         if (l instanceof AbstractList) {
>>             try {
>>
>> Final patchset would be
>>
>> 1) http://cr.openjdk.java.net/~snazarki/webrev/8037866/
>> 2) http://cr.openjdk.java.net/~snazarki/webrev/8067796/
Yes, let's go with that. It seems like a crazy amount of code to import for
such a small patch, but it's all test code and the changes are trivial.
The most important thing is that the actual change to runtime code is
minimal.

-- 
Andrew Haley  (he/him)
Java Platform Lead Engineer
Red Hat UK Ltd. <https://www.redhat.com>
https://keybase.io/andrewhaley
EAC8 43EB D3EF DB98 CC77 2FAD A5CD 6035 332F A671



More information about the jdk8u-dev mailing list