On Tue, 5 Jan 2021 12:56:49 GMT, Maurizio Cimadamore <mcimadam...@openjdk.org> wrote:
> When the size of the memory map is zero, FileChannelImpl returns a `null` > Unmapper - this creates issues to the mapped memory segment implementation. > > To fix, I've created an empty mapped segment class which is initialized to > sensible defaults, and whose implenentation of force/load etc. do nothing. > > We already had a test for this condition - but the test was missing the > `@Test` annotation, so it was not run! I've now beefed up the test a bit to > make sure that mapped segment operations do not throw. This pull request has now been integrated. Changeset: b7940aa1 Author: Maurizio Cimadamore <mcimadam...@openjdk.org> URL: https://git.openjdk.java.net/jdk16/commit/b7940aa1 Stats: 54 lines in 2 files changed: 51 ins; 1 del; 2 mod 8259027: NullPointerException in makeMappedSegment due to NULL Unmapper when length of segment is 0 Reviewed-by: chegar, uschindler ------------- PR: https://git.openjdk.java.net/jdk16/pull/83