RFR: 8285405: add test and check for negative argument to HashMap::newHashMap et al

Naoto Sato naoto at openjdk.org
Tue Aug 9 17:06:30 UTC 2022


On Tue, 9 Aug 2022 09:36:28 GMT, Jaikiran Pai <jpai at openjdk.org> wrote:

> (This is a recreation of a previous pull request which had received some reviews https://github.com/openjdk/jdk/pull/9036. I had to delete that personal branch and recreate it due to some git issues)
> 
> Can I please get a review of this change which addresses https://bugs.openjdk.java.net/browse/JDK-8285405?

Looks good as it stands.

test/jdk/java/util/HashMap/WhiteBoxResizeTest.java line 458:

> 456:             // received the expected exception
> 457:         }
> 458:     }

Could utilize `assertThrows`, instead of try-catch.

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

Marked as reviewed by naoto (Reviewer).

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


More information about the core-libs-dev mailing list