RFR: 8288515: (ch) Unnecessary use of Math.addExact() in java.nio.channels.FileLock.overlaps()

Alan Bateman alanb at openjdk.org
Wed Jun 22 06:45:55 UTC 2022


On Wed, 22 Jun 2022 00:13:35 GMT, Brian Burkhalter <bpb at openjdk.org> wrote:

> `FileLock` checks the immutable `position` and `size` parameters in its constructor hence using `Math.addExact()` on these instance variables in `overlaps()` is needless.

Marked as reviewed by alanb (Reviewer).

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

PR: https://git.openjdk.org/jdk/pull/9229


More information about the nio-dev mailing list