On Fri, 13 May 2022 05:54:15 GMT, Alan Bateman <al...@openjdk.org> wrote:

>> src/java.base/linux/classes/sun/nio/ch/EPollSelectorImpl.java line 128:
>> 
>>> 126:                     // timed poll interrupted so need to adjust timeout
>>> 127:                     long adjust = System.nanoTime() - startTime;
>>> 128:                     to =- (int) TimeUnit.NANOSECONDS.toMillis(adjust);
>> 
>> This will now always assign a negative number to `to`.
>> 
>> --------------------------------------------------------------------------------
>> 
>> `=-` is not a compound assignment, it’s negation followed by a normal 
>> assignment.
>
> Well spotted, I don't think that change was intentionally.

Ouch; Will fix:

I took Alan's earlier comment literally:

"This one can also be changed to:

to =- (int) TimeUnit.NANOSECONDS.toMillis(adjust);"

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

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

Reply via email to