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

Brian Burkhalter bpb at openjdk.org
Thu Jun 23 15:43:43 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.

This pull request has now been integrated.

Changeset: ef17ee4d
Author:    Brian Burkhalter <bpb at openjdk.org>
URL:       https://git.openjdk.org/jdk/commit/ef17ee4dea38c3bb953927bfdaabf1fe1b7e54ea
Stats:     7 lines in 1 file changed: 0 ins; 3 del; 4 mod

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

Reviewed-by: alanb

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

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


More information about the nio-dev mailing list