RFR: 8286378: Address possibly lossy conversions in java.base [v3]
    Alan Bateman 
    alanb at openjdk.java.net
       
    Fri May 13 05:56:40 UTC 2022
    
    
  
On Fri, 13 May 2022 04:41:03 GMT, ExE Boss <duke at openjdk.java.net> wrote:
>> Roger Riggs has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   Updated copyrights
>>   Fixed cast style to add a space after cast, (where consistent with file style)
>>   Improved code per review comments in PollSelectors.
>
> 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.
-------------
PR: https://git.openjdk.java.net/jdk/pull/8642
    
    
More information about the net-dev
mailing list