Re: RFR: 8285405: add test and check for negative argument to HashMap::newHashMap et al [v3]

2022-06-10 Thread Jaikiran Pai
On Fri, 10 Jun 2022 08:26:02 GMT, Jaikiran Pai  wrote:

>> Can I please get a review of this change which addresses 
>> https://bugs.openjdk.java.net/browse/JDK-8285405?
>> 
>> I've added the test for `LinkedHashMap.newLinkedHashMap(int)` in the 
>> existing `test/jdk/java/util/LinkedHashMap/Basic.java` since that test has 
>> tests for various APIs of this class.
>> 
>> For `WeakHashMap.newWeakHashMap` and `HashMap.newHashMap`, I have created 
>> new test classes under relevant locations, since these classes already have 
>> test classes (almost) per API/feature in those locations.
>
> Jaikiran Pai has updated the pull request incrementally with one additional 
> commit since the last revision:
> 
>   add newline at the end of the new file

I've now update the PR to include tests for `HashSet.newHashSet` and 
`LinkedHashSet.newLinkedHashSet` APIs. Additionally, their implementation too 
have has been modified to do the necessary negative param check. The copyright 
year on the `LinkedHashSet.java` file has also been updated accordingly.

P.S: Please ignore the bot message which talks about rebase/force-push. No 
rebase or force-push was done (only the recommended merge command was used to 
merge with latest master branch). I will check with the relevant team to see if 
there's some bug in the bot which generates that message. I have seen that 
happen recently on few other PRs as well.

-

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


Re: RFR: 8285405: add test and check for negative argument to HashMap::newHashMap et al [v3]

2022-06-10 Thread Jaikiran Pai
> Can I please get a review of this change which addresses 
> https://bugs.openjdk.java.net/browse/JDK-8285405?
> 
> I've added the test for `LinkedHashMap.newLinkedHashMap(int)` in the existing 
> `test/jdk/java/util/LinkedHashMap/Basic.java` since that test has tests for 
> various APIs of this class.
> 
> For `WeakHashMap.newWeakHashMap` and `HashMap.newHashMap`, I have created new 
> test classes under relevant locations, since these classes already have test 
> classes (almost) per API/feature in those locations.

Jaikiran Pai has updated the pull request incrementally with one additional 
commit since the last revision:

  add newline at the end of the new file

-

Changes:
  - all: https://git.openjdk.org/jdk/pull/9036/files
  - new: https://git.openjdk.org/jdk/pull/9036/files/07bbaa91..ba159d14

Webrevs:
 - full: https://webrevs.openjdk.java.net/?repo=jdk=9036=02
 - incr: https://webrevs.openjdk.java.net/?repo=jdk=9036=01-02

  Stats: 1 line in 1 file changed: 0 ins; 0 del; 1 mod
  Patch: https://git.openjdk.org/jdk/pull/9036.diff
  Fetch: git fetch https://git.openjdk.org/jdk pull/9036/head:pull/9036

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


Re: RFR: 8285405: add test and check for negative argument to HashMap::newHashMap et al [v2]

2022-06-10 Thread Jaikiran Pai
> Can I please get a review of this change which addresses 
> https://bugs.openjdk.java.net/browse/JDK-8285405?
> 
> I've added the test for `LinkedHashMap.newLinkedHashMap(int)` in the existing 
> `test/jdk/java/util/LinkedHashMap/Basic.java` since that test has tests for 
> various APIs of this class.
> 
> For `WeakHashMap.newWeakHashMap` and `HashMap.newHashMap`, I have created new 
> test classes under relevant locations, since these classes already have test 
> classes (almost) per API/feature in those locations.

Jaikiran Pai has updated the pull request with a new target base due to a merge 
or a rebase. The incremental webrev excludes the unrelated changes brought in 
by the merge/rebase. The pull request contains four additional commits since 
the last revision:

 - Add tests for the new HashSet#newHashSet and LinkedHashSet#newLinkedHashSet 
APIs
 - add a check for negative numElements very early in the new APIs of HashSet 
and LinkedHashSet
 - Merge latest from master branch
 - 8285405: add test and check for negative argument to HashMap::newHashMap et 
al

-

Changes:
  - all: https://git.openjdk.org/jdk/pull/9036/files
  - new: https://git.openjdk.org/jdk/pull/9036/files/9ccebd79..07bbaa91

Webrevs:
 - full: https://webrevs.openjdk.java.net/?repo=jdk=9036=01
 - incr: https://webrevs.openjdk.java.net/?repo=jdk=9036=00-01

  Stats: 9862 lines in 210 files changed: 8727 ins; 512 del; 623 mod
  Patch: https://git.openjdk.org/jdk/pull/9036.diff
  Fetch: git fetch https://git.openjdk.org/jdk pull/9036/head:pull/9036

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


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

2022-06-09 Thread Jaikiran Pai
On Mon, 6 Jun 2022 06:57:23 GMT, Jaikiran Pai  wrote:

> Can I please get a review of this change which addresses 
> https://bugs.openjdk.java.net/browse/JDK-8285405?
> 
> I've added the test for `LinkedHashMap.newLinkedHashMap(int)` in the existing 
> `test/jdk/java/util/LinkedHashMap/Basic.java` since that test has tests for 
> various APIs of this class.
> 
> For `WeakHashMap.newWeakHashMap` and `HashMap.newHashMap`, I have created new 
> test classes under relevant locations, since these classes already have test 
> classes (almost) per API/feature in those locations.

Hello Stuart, I'll include tests for those in this PR shortly.

-

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


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

2022-06-09 Thread Stuart Marks
On Mon, 6 Jun 2022 06:57:23 GMT, Jaikiran Pai  wrote:

> Can I please get a review of this change which addresses 
> https://bugs.openjdk.java.net/browse/JDK-8285405?
> 
> I've added the test for `LinkedHashMap.newLinkedHashMap(int)` in the existing 
> `test/jdk/java/util/LinkedHashMap/Basic.java` since that test has tests for 
> various APIs of this class.
> 
> For `WeakHashMap.newWeakHashMap` and `HashMap.newHashMap`, I have created new 
> test classes under relevant locations, since these classes already have test 
> classes (almost) per API/feature in those locations.

Note that I've integrated 
[JDK-8284780](https://bugs.openjdk.org/browse/JDK-8284780) (HashSet static 
factories) so maybe this PR could be updated with tests for those as well.

-

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


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

2022-06-08 Thread Lance Andersen
On Mon, 6 Jun 2022 06:57:23 GMT, Jaikiran Pai  wrote:

> Can I please get a review of this change which addresses 
> https://bugs.openjdk.java.net/browse/JDK-8285405?
> 
> I've added the test for `LinkedHashMap.newLinkedHashMap(int)` in the existing 
> `test/jdk/java/util/LinkedHashMap/Basic.java` since that test has tests for 
> various APIs of this class.
> 
> For `WeakHashMap.newWeakHashMap` and `HashMap.newHashMap`, I have created new 
> test classes under relevant locations, since these classes already have test 
> classes (almost) per API/feature in those locations.

Marked as reviewed by lancea (Reviewer).

-

PR: https://git.openjdk.java.net/jdk/pull/9036