Re: RFR: 8284780: Need methods to create pre-sized HashSet and LinkedHashSet [v19]

2022-06-08 Thread Anthony Scarpino
On Wed, 8 Jun 2022 17:49:38 GMT, XenoAmess  wrote:

>> as title.
>
> XenoAmess has updated the pull request incrementally with one additional 
> commit since the last revision:
> 
>   clean up Calendar

I gave a quick look at the security files touched and seems straightforward. I 
didn't see any problems

-

Marked as reviewed by ascarpino (Reviewer).

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


Re: RFR: 8284780: Need methods to create pre-sized HashSet and LinkedHashSet [v19]

2022-06-08 Thread Stuart Marks
On Wed, 8 Jun 2022 17:49:38 GMT, XenoAmess  wrote:

>> as title.
>
> XenoAmess has updated the pull request incrementally with one additional 
> commit since the last revision:
> 
>   clean up Calendar

Running tests and awaiting review from security team. Our internal test system 
is backlogged and tests might not complete in time to get into JDK 19.

-

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


Re: RFR: 8284780: Need methods to create pre-sized HashSet and LinkedHashSet [v19]

2022-06-08 Thread XenoAmess
> as title.

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

  clean up Calendar

-

Changes:
  - all: https://git.openjdk.java.net/jdk/pull/8302/files
  - new: https://git.openjdk.java.net/jdk/pull/8302/files/bacc9ca8..95d59b97

Webrevs:
 - full: https://webrevs.openjdk.java.net/?repo=jdk=8302=18
 - incr: https://webrevs.openjdk.java.net/?repo=jdk=8302=17-18

  Stats: 8 lines in 1 file changed: 0 ins; 7 del; 1 mod
  Patch: https://git.openjdk.java.net/jdk/pull/8302.diff
  Fetch: git fetch https://git.openjdk.java.net/jdk pull/8302/head:pull/8302

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


Re: RFR: 8284780: Need methods to create pre-sized HashSet and LinkedHashSet [v17]

2022-06-08 Thread XenoAmess
On Wed, 1 Jun 2022 18:26:17 GMT, Naoto Sato  wrote:

>> XenoAmess has updated the pull request incrementally with one additional 
>> commit since the last revision:
>> 
>>   do it as naotoj said
>
> src/java.base/share/classes/java/util/Calendar.java line 2648:
> 
>> 2646: set.add("gregory");
>> 2647: set.add("buddhist");
>> 2648: set.add("japanese");
> 
> This can be replaced with `SET = Set.of("gregory", "buddhist", "japanese");`.

@naotoj Yes it can. I did a further clean up to it, please have a look.

-

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


Re: RFR: 8284780: Need methods to create pre-sized HashSet and LinkedHashSet [v17]

2022-06-08 Thread XenoAmess
On Wed, 1 Jun 2022 17:34:04 GMT, Stuart Marks  wrote:

>> XenoAmess has updated the pull request incrementally with one additional 
>> commit since the last revision:
>> 
>>   do it as naotoj said
>
> test/jdk/java/util/HashMap/WhiteBoxResizeTest.java line 441:
> 
>> 439: }
>> 440: }
>> 441: 
> 
> This unifies the test cases between the Set and Map factories, which 
> accomplishes the primary goal. Good.
> 
> The unification is achieved through classic object-oriented polymorphism, 
> which works fine, though which is rather verbose. This could probably be 
> reduced with some tinkering on the model, but it's probably reaching the 
> point where additional tinkering on the model isn't worth it. I'm ok with 
> sticking with this approach for now. Maybe we can clean it up later, or maybe 
> not -- it's at least fairly straightforward.
> 
> One issue that contributes to the verbosity is the repeated null checking. 
> The null checking enables the test code to proceed and end up with -1 as the 
> capacity if there's a null in there somewhere. This will cause the assertion 
> to fail. This is good in that it will call attention to itself (as opposed to 
> silently passing or something). However, if the test cases are set up 
> properly, they should never run into null. If the null checking weren't done, 
> an unexpected null will throw NPE, which will be caught be the framework and 
> reported as an error.
> 
> That seems perfectly fine to me, so I'd suggest simply removing the null 
> checking. That would also reduce the bulkiness of infrastructure.

@stuart-marks done.

-

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


Re: RFR: 8284780: Need methods to create pre-sized HashSet and LinkedHashSet [v18]

2022-06-08 Thread XenoAmess
> as title.

XenoAmess has updated the pull request incrementally with two additional 
commits since the last revision:

 - remove null check for Capacitiable in WhiteBoxResizeTest
 - Rename type variable per CSR request; minor spec wording change.

-

Changes:
  - all: https://git.openjdk.java.net/jdk/pull/8302/files
  - new: https://git.openjdk.java.net/jdk/pull/8302/files/98bfb0e1..bacc9ca8

Webrevs:
 - full: https://webrevs.openjdk.java.net/?repo=jdk=8302=17
 - incr: https://webrevs.openjdk.java.net/?repo=jdk=8302=16-17

  Stats: 19 lines in 3 files changed: 0 ins; 13 del; 6 mod
  Patch: https://git.openjdk.java.net/jdk/pull/8302.diff
  Fetch: git fetch https://git.openjdk.java.net/jdk pull/8302/head:pull/8302

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


Re: RFR: 8284780: Need methods to create pre-sized HashSet and LinkedHashSet [v17]

2022-06-02 Thread Daniel Fuchs
On Fri, 27 May 2022 18:40:32 GMT, XenoAmess  wrote:

>> as title.
>
> XenoAmess has updated the pull request incrementally with one additional 
> commit since the last revision:
> 
>   do it as naotoj said

Changes to `net` and `http` look good.

-

Marked as reviewed by dfuchs (Reviewer).

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


Re: RFR: 8284780: Need methods to create pre-sized HashSet and LinkedHashSet [v17]

2022-06-01 Thread Brian Burkhalter
On Fri, 27 May 2022 18:40:32 GMT, XenoAmess  wrote:

>> as title.
>
> XenoAmess has updated the pull request incrementally with one additional 
> commit since the last revision:
> 
>   do it as naotoj said

`java.io` and `java.nio` look all right.

-

Marked as reviewed by bpb (Reviewer).

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


Re: RFR: 8284780: Need methods to create pre-sized HashSet and LinkedHashSet [v17]

2022-06-01 Thread Naoto Sato
On Fri, 27 May 2022 18:40:32 GMT, XenoAmess  wrote:

>> as title.
>
> XenoAmess has updated the pull request incrementally with one additional 
> commit since the last revision:
> 
>   do it as naotoj said

Reviewed i18n-related changes and they look good. One minor suggestion in 
`Calendar`, but that can be applied later.

src/java.base/share/classes/java/util/Calendar.java line 2648:

> 2646: set.add("gregory");
> 2647: set.add("buddhist");
> 2648: set.add("japanese");

This can be replaced with `SET = Set.of("gregory", "buddhist", "japanese");`.

-

Marked as reviewed by naoto (Reviewer).

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


Re: RFR: 8284780: Need methods to create pre-sized HashSet and LinkedHashSet [v17]

2022-06-01 Thread Stuart Marks
On Fri, 27 May 2022 18:40:32 GMT, XenoAmess  wrote:

>> as title.
>
> XenoAmess has updated the pull request incrementally with one additional 
> commit since the last revision:
> 
>   do it as naotoj said

Reviewers for i18n, net, nio, and security, please review call site changes in 
your areas. Thanks.

-

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


Re: RFR: 8284780: Need methods to create pre-sized HashSet and LinkedHashSet [v17]

2022-06-01 Thread Stuart Marks
On Fri, 27 May 2022 18:40:32 GMT, XenoAmess  wrote:

>> as title.
>
> XenoAmess has updated the pull request incrementally with one additional 
> commit since the last revision:
> 
>   do it as naotoj said

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

> 439: }
> 440: }
> 441: 

This unifies the test cases between the Set and Map factories, which 
accomplishes the primary goal. Good.

The unification is achieved through classic object-oriented polymorphism, which 
works fine, though which is rather verbose. This could probably be reduced with 
some tinkering on the model, but it's probably reaching the point where 
additional tinkering on the model isn't worth it. I'm ok with sticking with 
this approach for now. Maybe we can clean it up later, or maybe not -- it's at 
least fairly straightforward.

One issue that contributes to the verbosity is the repeated null checking. The 
null checking enables the test code to proceed and end up with -1 as the 
capacity if there's a null in there somewhere. This will cause the assertion to 
fail. This is good in that it will call attention to itself (as opposed to 
silently passing or something). However, if the test cases are set up properly, 
they should never run into null. If the null checking weren't done, an 
unexpected null will throw NPE, which will be caught be the framework and 
reported as an error.

That seems perfectly fine to me, so I'd suggest simply removing the null 
checking. That would also reduce the bulkiness of infrastructure.

-

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


Re: RFR: 8284780: Need methods to create pre-sized HashSet and LinkedHashSet [v17]

2022-06-01 Thread liach
On Fri, 27 May 2022 18:40:32 GMT, XenoAmess  wrote:

>> as title.
>
> XenoAmess has updated the pull request incrementally with one additional 
> commit since the last revision:
> 
>   do it as naotoj said

'the new' fix should be applied to newHashMap etc. too.

-

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


Re: RFR: 8284780: Need methods to create pre-sized HashSet and LinkedHashSet [v14]

2022-06-01 Thread Stuart Marks
On Fri, 27 May 2022 06:09:59 GMT, XenoAmess  wrote:

>> Thanks for the updates. I've made a couple minor changes to the specs; 
>> please merge the latest commit from this branch:
>> 
>> https://github.com/stuart-marks/jdk/tree/pull/8302
>> 
>> I've created a CSR and have included these changes in it. Please review: 
>> [JDK-8287419](https://bugs.openjdk.java.net/browse/JDK-8287419)
>> 
>> I'll look at the test changes later. I wanted to get the CSR moving first, 
>> since it will take a few days (and a long weekend in the US is coming up).
>
> @stuart-marks @liach done.

@XenoAmess Please merge the latest commit from 
https://github.com/stuart-marks/jdk/commits/pull/8302 which contains changes 
requested during the CSR review. Thanks.

-

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


Re: RFR: 8284780: Need methods to create pre-sized HashSet and LinkedHashSet [v17]

2022-05-31 Thread Stuart Marks
On Fri, 27 May 2022 18:40:32 GMT, XenoAmess  wrote:

>> as title.
>
> XenoAmess has updated the pull request incrementally with one additional 
> commit since the last revision:
> 
>   do it as naotoj said

Reviewers, could I get a review for CSR 
[JDK-8287419](https://bugs.openjdk.java.net/browse/JDK-8287419) please? Thanks.

-

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


Re: RFR: 8284780: Need methods to create pre-sized HashSet and LinkedHashSet [v16]

2022-05-27 Thread XenoAmess
On Fri, 27 May 2022 16:19:56 GMT, Naoto Sato  wrote:

>> XenoAmess has updated the pull request incrementally with two additional 
>> commits since the last revision:
>> 
>>  - Merge remote-tracking branch 'stuart-marks/pull/8302' into fix_8284780
>>
>># Conflicts:
>># src/java.base/share/classes/java/util/HashSet.java
>># src/java.base/share/classes/java/util/LinkedHashSet.java
>>  - Minor terminology fixes: change "item" and "key" to element; remove
>>"insertion-ordered" from LinkedHashSet static factory method because
>>LHS is implicit insertion-ordered.
>
> src/java.base/share/classes/sun/util/cldr/CLDRLocaleProviderAdapter.java line 
> 227:
> 
>> 225: }
>> 226: StringTokenizer tokens = new 
>> StringTokenizer(supportedLocaleString);
>> 227: Set tagset = HashSet.newHashSet(tokens.countTokens());
> 
> Hi @XenoAmess, during the refactoring of the above `StringTokenizer`, it 
> turned out that this `HashSet` can be replaced with `Set.of()`. So you can 
> leave this piece as it is, as I will take care of it with JDK-8287340.

@naotoj done.

> src/java.base/share/classes/sun/util/locale/provider/JRELocaleProviderAdapter.java
>  line 461:
> 
>> 459: }
>> 460: StringTokenizer tokens = new 
>> StringTokenizer(supportedLocaleString);
>> 461: Set tagset = HashSet.newHashSet(tokens.countTokens());
> 
> Same as above.

@naotoj done.

-

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


Re: RFR: 8284780: Need methods to create pre-sized HashSet and LinkedHashSet [v17]

2022-05-27 Thread XenoAmess
> as title.

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

  do it as naotoj said

-

Changes:
  - all: https://git.openjdk.java.net/jdk/pull/8302/files
  - new: https://git.openjdk.java.net/jdk/pull/8302/files/230a767e..98bfb0e1

Webrevs:
 - full: https://webrevs.openjdk.java.net/?repo=jdk=8302=16
 - incr: https://webrevs.openjdk.java.net/?repo=jdk=8302=15-16

  Stats: 2 lines in 2 files changed: 0 ins; 0 del; 2 mod
  Patch: https://git.openjdk.java.net/jdk/pull/8302.diff
  Fetch: git fetch https://git.openjdk.java.net/jdk pull/8302/head:pull/8302

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


Re: RFR: 8284780: Need methods to create pre-sized HashSet and LinkedHashSet [v16]

2022-05-27 Thread Naoto Sato
On Fri, 27 May 2022 06:14:13 GMT, XenoAmess  wrote:

>> as title.
>
> XenoAmess has updated the pull request incrementally with two additional 
> commits since the last revision:
> 
>  - Merge remote-tracking branch 'stuart-marks/pull/8302' into fix_8284780
>
># Conflicts:
>#  src/java.base/share/classes/java/util/HashSet.java
>#  src/java.base/share/classes/java/util/LinkedHashSet.java
>  - Minor terminology fixes: change "item" and "key" to element; remove
>"insertion-ordered" from LinkedHashSet static factory method because
>LHS is implicit insertion-ordered.

src/java.base/share/classes/sun/util/cldr/CLDRLocaleProviderAdapter.java line 
227:

> 225: }
> 226: StringTokenizer tokens = new 
> StringTokenizer(supportedLocaleString);
> 227: Set tagset = HashSet.newHashSet(tokens.countTokens());

Hi @XenoAmess, during the refactoring of the above `StringTokenizer`, it turned 
out that this `HashSet` can be replaced with `Set.of()`. So you can leave this 
piece as it is, as I will take care of it with JDK-8287340.

src/java.base/share/classes/sun/util/locale/provider/JRELocaleProviderAdapter.java
 line 461:

> 459: }
> 460: StringTokenizer tokens = new 
> StringTokenizer(supportedLocaleString);
> 461: Set tagset = HashSet.newHashSet(tokens.countTokens());

Same as above.

-

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


Re: RFR: 8284780: Need methods to create pre-sized HashSet and LinkedHashSet [v14]

2022-05-27 Thread XenoAmess
On Fri, 27 May 2022 05:31:28 GMT, Stuart Marks  wrote:

>> XenoAmess has updated the pull request with a new target base due to a merge 
>> or a rebase. The pull request now contains 16 commits:
>> 
>>  - Merge branch 'master' of https://git.openjdk.java.net/jdk into fix_8284780
>>  - Merge remote-tracking branch 'openjdk/master' into fix_8284780
>>
>># Conflicts:
>># test/jdk/java/util/HashMap/WhiteBoxResizeTest.java
>>  - add 8284780 to test
>>  - redo the tests
>>  - rename items to elements
>>  - add test for newHashSet and newLinkedHashSet
>>  - revert much too changes for newHashSet
>>  - add more replaces
>>  - add more replaces
>>  - add more replaces
>>  - ... and 6 more: 
>> https://git.openjdk.java.net/jdk/compare/7cb368b3...117918f4
>
> Thanks for the updates. I've made a couple minor changes to the specs; please 
> merge the latest commit from this branch:
> 
> https://github.com/stuart-marks/jdk/tree/pull/8302
> 
> I've created a CSR and have included these changes in it. Please review: 
> [JDK-8287419](https://bugs.openjdk.java.net/browse/JDK-8287419)
> 
> I'll look at the test changes later. I wanted to get the CSR moving first, 
> since it will take a few days (and a long weekend in the US is coming up).

@stuart-marks @liach done.

-

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


Re: RFR: 8284780: Need methods to create pre-sized HashSet and LinkedHashSet [v16]

2022-05-27 Thread XenoAmess
> as title.

XenoAmess has updated the pull request incrementally with two additional 
commits since the last revision:

 - Merge remote-tracking branch 'stuart-marks/pull/8302' into fix_8284780
   
   # Conflicts:
   #src/java.base/share/classes/java/util/HashSet.java
   #src/java.base/share/classes/java/util/LinkedHashSet.java
 - Minor terminology fixes: change "item" and "key" to element; remove
   "insertion-ordered" from LinkedHashSet static factory method because
   LHS is implicit insertion-ordered.

-

Changes:
  - all: https://git.openjdk.java.net/jdk/pull/8302/files
  - new: https://git.openjdk.java.net/jdk/pull/8302/files/42fba932..230a767e

Webrevs:
 - full: https://webrevs.openjdk.java.net/?repo=jdk=8302=15
 - incr: https://webrevs.openjdk.java.net/?repo=jdk=8302=14-15

  Stats: 3 lines in 2 files changed: 0 ins; 0 del; 3 mod
  Patch: https://git.openjdk.java.net/jdk/pull/8302.diff
  Fetch: git fetch https://git.openjdk.java.net/jdk pull/8302/head:pull/8302

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


Re: RFR: 8284780: Need methods to create pre-sized HashSet and LinkedHashSet [v15]

2022-05-27 Thread XenoAmess
> as title.

XenoAmess has updated the pull request incrementally with six additional 
commits since the last revision:

 - Update src/java.base/share/classes/java/util/LinkedHashSet.java
   
   Co-authored-by: liach <7806504+li...@users.noreply.github.com>
 - Update src/java.base/share/classes/java/util/LinkedHashSet.java
   
   Co-authored-by: liach <7806504+li...@users.noreply.github.com>
 - Update src/java.base/share/classes/java/util/LinkedHashSet.java
   
   Co-authored-by: liach <7806504+li...@users.noreply.github.com>
 - Update src/java.base/share/classes/java/util/HashSet.java
   
   Co-authored-by: liach <7806504+li...@users.noreply.github.com>
 - Update src/java.base/share/classes/java/util/HashSet.java
   
   Co-authored-by: liach <7806504+li...@users.noreply.github.com>
 - Update src/java.base/share/classes/java/util/HashSet.java
   
   Co-authored-by: liach <7806504+li...@users.noreply.github.com>

-

Changes:
  - all: https://git.openjdk.java.net/jdk/pull/8302/files
  - new: https://git.openjdk.java.net/jdk/pull/8302/files/117918f4..42fba932

Webrevs:
 - full: https://webrevs.openjdk.java.net/?repo=jdk=8302=14
 - incr: https://webrevs.openjdk.java.net/?repo=jdk=8302=13-14

  Stats: 6 lines in 2 files changed: 0 ins; 0 del; 6 mod
  Patch: https://git.openjdk.java.net/jdk/pull/8302.diff
  Fetch: git fetch https://git.openjdk.java.net/jdk pull/8302/head:pull/8302

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


Re: RFR: 8284780: Need methods to create pre-sized HashSet and LinkedHashSet [v14]

2022-05-26 Thread Stuart Marks
On Thu, 26 May 2022 18:08:13 GMT, XenoAmess  wrote:

>> as title.
>
> XenoAmess has updated the pull request with a new target base due to a merge 
> or a rebase. The pull request now contains 16 commits:
> 
>  - Merge branch 'master' of https://git.openjdk.java.net/jdk into fix_8284780
>  - Merge remote-tracking branch 'openjdk/master' into fix_8284780
>
># Conflicts:
>#  test/jdk/java/util/HashMap/WhiteBoxResizeTest.java
>  - add 8284780 to test
>  - redo the tests
>  - rename items to elements
>  - add test for newHashSet and newLinkedHashSet
>  - revert much too changes for newHashSet
>  - add more replaces
>  - add more replaces
>  - add more replaces
>  - ... and 6 more: 
> https://git.openjdk.java.net/jdk/compare/7cb368b3...117918f4

Thanks for the updates. I've made a couple minor changes to the specs; please 
merge the latest commit from this branch:

https://github.com/stuart-marks/jdk/tree/pull/8302

I've created a CSR and have included these changes in it. Please review: 
[JDK-8287419](https://bugs.openjdk.java.net/browse/JDK-8287419)

I'll look at the test changes later. I wanted to get the CSR moving first, 
since it will take a few days (and a long weekend in the US is coming up).

-

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


Re: RFR: 8284780: Need methods to create pre-sized HashSet and LinkedHashSet [v14]

2022-05-26 Thread liach
On Thu, 26 May 2022 18:08:13 GMT, XenoAmess  wrote:

>> as title.
>
> XenoAmess has updated the pull request with a new target base due to a merge 
> or a rebase. The pull request now contains 16 commits:
> 
>  - Merge branch 'master' of https://git.openjdk.java.net/jdk into fix_8284780
>  - Merge remote-tracking branch 'openjdk/master' into fix_8284780
>
># Conflicts:
>#  test/jdk/java/util/HashMap/WhiteBoxResizeTest.java
>  - add 8284780 to test
>  - redo the tests
>  - rename items to elements
>  - add test for newHashSet and newLinkedHashSet
>  - revert much too changes for newHashSet
>  - add more replaces
>  - add more replaces
>  - add more replaces
>  - ... and 6 more: 
> https://git.openjdk.java.net/jdk/compare/7cb368b3...117918f4

src/java.base/share/classes/java/util/HashSet.java line 130:

> 128:  * @apiNote
> 129:  * To create a {@code HashSet} with an initial capacity that 
> accommodates
> 130:  * an expected number of items, use {@link #newHashSet(int) 
> newHashSet}.

Suggestion:

 * an expected number of elements, use {@link #newHashSet(int) newHashSet}.

src/java.base/share/classes/java/util/HashSet.java line 147:

> 145:  * @apiNote
> 146:  * To create a {@code HashSet} with an initial capacity that 
> accommodates
> 147:  * an expected number of items, use {@link #newHashSet(int) 
> newHashSet}.

Suggestion:

 * an expected number of elements, use {@link #newHashSet(int) newHashSet}.

src/java.base/share/classes/java/util/HashSet.java line 391:

> 389:  *
> 390:  * @param numElementsthe expected number of elements
> 391:  * @param  the type of keys maintained by this set

Suggestion:

 * @param  the type of elements maintained by this set

src/java.base/share/classes/java/util/LinkedHashSet.java line 131:

> 129:  * @apiNote
> 130:  * To create a {@code LinkedHashSet} with an initial capacity that 
> accommodates
> 131:  * an expected number of items, use {@link #newLinkedHashSet(int) 
> newLinkedHashSet}.

Suggestion:

 * an expected number of elements, use {@link #newLinkedHashSet(int) 
newLinkedHashSet}.

src/java.base/share/classes/java/util/LinkedHashSet.java line 148:

> 146:  * @apiNote
> 147:  * To create a {@code LinkedHashSet} with an initial capacity that 
> accommodates
> 148:  * an expected number of items, use {@link #newLinkedHashSet(int) 
> newLinkedHashSet}.

Suggestion:

 * an expected number of elements, use {@link #newLinkedHashSet(int) 
newLinkedHashSet}.

src/java.base/share/classes/java/util/LinkedHashSet.java line 212:

> 210:  *
> 211:  * @param numElementsthe expected number of elements
> 212:  * @param  the type of keys maintained by this set

Suggestion:

 * @param  the type of elements maintained by this set

-

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


Re: RFR: 8284780: Need methods to create pre-sized HashSet and LinkedHashSet [v4]

2022-05-26 Thread XenoAmess
On Wed, 18 May 2022 23:20:45 GMT, Stuart Marks  wrote:

>>> Need to add apiNote documentation section to capacity-based constructors 
>>> like for maps.
>> 
>> @liach done.
>
> @XenoAmess oops, sorry for the delay. I think it would be good to get these 
> into 19 as companions to `HashMap.newHashMap` et. al.
> 
> As before, I'd suggest reducing the number of changes to use sites in order 
> to make review easier. I would suggest keeping the changes under src in 
> java.base, java.net.http, java.rmi, and jdk.zipfs, and omitting all the other 
> changes. Also keep the changes under test/jdk.
> 
> There needs to be a test for these new methods. I haven't thought much how to 
> do that. My first attempt would be to modify our favorite WhiteBoxResizeTest 
> and add a bit of machinery that asserts the table length of the HashMap 
> contained within the created HashSet/LinkedHashSet. I haven't looked at it 
> though, so it might not work out, in which case you should pursue an 
> alternative approach.
> 
> I'll look at the specs and suggest updates as necessary and then handle 
> filing of a CSR.

@stuart-marks @liach 
Hi guys.
After a good sleep and a rethink, I re-wrote some part of the test.
It seems be logically better than the way before.
please have a look.

-

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


Re: RFR: 8284780: Need methods to create pre-sized HashSet and LinkedHashSet [v13]

2022-05-26 Thread XenoAmess
> as title.

XenoAmess has updated the pull request with a new target base due to a merge or 
a rebase. The pull request now contains 15 commits:

 - Merge remote-tracking branch 'openjdk/master' into fix_8284780
   
   # Conflicts:
   #test/jdk/java/util/HashMap/WhiteBoxResizeTest.java
 - add 8284780 to test
 - redo the tests
 - rename items to elements
 - add test for newHashSet and newLinkedHashSet
 - revert much too changes for newHashSet
 - add more replaces
 - add more replaces
 - add more replaces
 - add more replaces
 - ... and 5 more: https://git.openjdk.java.net/jdk/compare/7eb15593...59caa1f4

-

Changes: https://git.openjdk.java.net/jdk/pull/8302/files
 Webrev: https://webrevs.openjdk.java.net/?repo=jdk=8302=12
  Stats: 162 lines in 31 files changed: 120 ins; 0 del; 42 mod
  Patch: https://git.openjdk.java.net/jdk/pull/8302.diff
  Fetch: git fetch https://git.openjdk.java.net/jdk pull/8302/head:pull/8302

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


Re: RFR: 8284780: Need methods to create pre-sized HashSet and LinkedHashSet [v14]

2022-05-26 Thread XenoAmess
> as title.

XenoAmess has updated the pull request with a new target base due to a merge or 
a rebase. The pull request now contains 16 commits:

 - Merge branch 'master' of https://git.openjdk.java.net/jdk into fix_8284780
 - Merge remote-tracking branch 'openjdk/master' into fix_8284780
   
   # Conflicts:
   #test/jdk/java/util/HashMap/WhiteBoxResizeTest.java
 - add 8284780 to test
 - redo the tests
 - rename items to elements
 - add test for newHashSet and newLinkedHashSet
 - revert much too changes for newHashSet
 - add more replaces
 - add more replaces
 - add more replaces
 - ... and 6 more: https://git.openjdk.java.net/jdk/compare/7cb368b3...117918f4

-

Changes: https://git.openjdk.java.net/jdk/pull/8302/files
 Webrev: https://webrevs.openjdk.java.net/?repo=jdk=8302=13
  Stats: 162 lines in 31 files changed: 120 ins; 0 del; 42 mod
  Patch: https://git.openjdk.java.net/jdk/pull/8302.diff
  Fetch: git fetch https://git.openjdk.java.net/jdk pull/8302/head:pull/8302

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


Re: RFR: 8284780: Need methods to create pre-sized HashSet and LinkedHashSet [v10]

2022-05-26 Thread XenoAmess
On Wed, 25 May 2022 05:22:44 GMT, Stuart Marks  wrote:

>> test/jdk/java/util/HashMap/WhiteBoxResizeTest.java line 360:
>> 
>>> 358: throw new RuntimeException(e);
>>> 359: }
>>> 360: })
>> 
>> These probably need a `mapField.setAccessible(true)` call, or a `VarHandle` 
>> for the `HashSet.map` field.
>
> Yes, this test fails with IllegalAccessException. Probably it's easiest to 
> use a VarHandle to get private fields, similar to other usage already in this 
> test.
> 
> This test case is a bit odd though in that it's supposed to test HashSet and 
> LinkedHashSet but it mostly actually tests HashMap. It creates the Set 
> instance and immediately extracts the HashMap, which is then passed to the 
> actual test, which operates directly on the HashMap. It would be preferable 
> to create a Set; add an element (so that it's properly allocated); and then 
> make assertions over the Set (which involve extracting the HashMap, etc.) It 
> seems like there should be factoring that allows this sort of arrangement to 
> be retrofitted without adding too much complication.
> 
> Finally, please add "8284780" to the `@bug` line at the top of this test.

@stuart-marks I refactored the tests. please have a look.

@stuart-marks 8284780 added.

-

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


Re: RFR: 8284780: Need methods to create pre-sized HashSet and LinkedHashSet [v12]

2022-05-26 Thread XenoAmess
> as title.

XenoAmess has updated the pull request incrementally with two additional 
commits since the last revision:

 - add 8284780 to test
 - redo the tests

-

Changes:
  - all: https://git.openjdk.java.net/jdk/pull/8302/files
  - new: https://git.openjdk.java.net/jdk/pull/8302/files/4ec6ba9f..df5a8512

Webrevs:
 - full: https://webrevs.openjdk.java.net/?repo=jdk=8302=11
 - incr: https://webrevs.openjdk.java.net/?repo=jdk=8302=10-11

  Stats: 92 lines in 1 file changed: 65 ins; 16 del; 11 mod
  Patch: https://git.openjdk.java.net/jdk/pull/8302.diff
  Fetch: git fetch https://git.openjdk.java.net/jdk pull/8302/head:pull/8302

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


Re: RFR: 8284780: Need methods to create pre-sized HashSet and LinkedHashSet [v10]

2022-05-26 Thread XenoAmess
On Wed, 25 May 2022 04:50:33 GMT, liach  wrote:

>> XenoAmess has updated the pull request incrementally with one additional 
>> commit since the last revision:
>> 
>>   add test for newHashSet and newLinkedHashSet
>
> test/jdk/java/util/HashMap/WhiteBoxResizeTest.java line 354:
> 
>> 352: rsc("rsls", size, cap, () -> {
>> 353: try {
>> 354: Field mapField = 
>> HashSet.class.getDeclaredField("map");
> 
> For clarity, consider using var handle/method handle and keep the reflection 
> code in the `WhiteBoxResizeTest` constructor.

@liach I refactored the tests. please have a look.

-

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


Re: RFR: 8284780: Need methods to create pre-sized HashSet and LinkedHashSet [v10]

2022-05-26 Thread XenoAmess
On Wed, 25 May 2022 05:07:12 GMT, Stuart Marks  wrote:

>> XenoAmess has updated the pull request incrementally with one additional 
>> commit since the last revision:
>> 
>>   add test for newHashSet and newLinkedHashSet
>
> src/java.base/share/classes/java/util/HashSet.java line 398:
> 
>> 396: public static  HashSet newHashSet(int numItems) {
>> 397: return new 
>> HashSet<>(HashMap.calculateHashMapCapacity(numItems));
>> 398: }
> 
> Please use "elements" instead of "items" throughout the specifications for 
> the objects that are members of the HashSet. This includes the API notes 
> above as well as the specs and API notes in LinkedHashSet.

@stuart-marks done.

-

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


Re: RFR: 8284780: Need methods to create pre-sized HashSet and LinkedHashSet [v11]

2022-05-26 Thread XenoAmess
> as title.

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

  rename items to elements

-

Changes:
  - all: https://git.openjdk.java.net/jdk/pull/8302/files
  - new: https://git.openjdk.java.net/jdk/pull/8302/files/56d029f4..4ec6ba9f

Webrevs:
 - full: https://webrevs.openjdk.java.net/?repo=jdk=8302=10
 - incr: https://webrevs.openjdk.java.net/?repo=jdk=8302=09-10

  Stats: 12 lines in 2 files changed: 0 ins; 0 del; 12 mod
  Patch: https://git.openjdk.java.net/jdk/pull/8302.diff
  Fetch: git fetch https://git.openjdk.java.net/jdk pull/8302/head:pull/8302

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


Re: RFR: 8284780: Need methods to create pre-sized HashSet and LinkedHashSet [v10]

2022-05-25 Thread XenoAmess
On Wed, 25 May 2022 05:22:44 GMT, Stuart Marks  wrote:

> Yes, this test fails with IllegalAccessException. Probably it's easiest to 
> use a VarHandle to get private fields, similar to other usage already in this 
> test.
> 
> This test case is a bit odd though in that it's supposed to test HashSet and 
> LinkedHashSet but it mostly actually tests HashMap. It creates the Set 
> instance and immediately extracts the HashMap, which is then passed to the 
> actual test, which operates directly on the HashMap.

Considering about it being a whitebox test, it is not very weird, but still 
weird enough.
A better way might be wrap it into another layer.
Will try it when I have time.

-

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


Re: RFR: 8284780: Need methods to create pre-sized HashSet and LinkedHashSet [v10]

2022-05-25 Thread Naoto Sato
On Wed, 25 May 2022 05:42:22 GMT, Stuart Marks  wrote:

> (Also, I haven't seen `StringTokenizer` in a long time)

That's some old code lingering in locale-related stuff. Will fix them after 
this PR gets integrated.

-

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


Re: RFR: 8284780: Need methods to create pre-sized HashSet and LinkedHashSet [v10]

2022-05-24 Thread Stuart Marks
On Wed, 25 May 2022 03:02:45 GMT, ExE Boss  wrote:

>> XenoAmess has updated the pull request incrementally with one additional 
>> commit since the last revision:
>> 
>>   add test for newHashSet and newLinkedHashSet
>
> test/jdk/java/util/HashMap/WhiteBoxResizeTest.java line 360:
> 
>> 358: throw new RuntimeException(e);
>> 359: }
>> 360: })
> 
> These probably need a `mapField.setAccessible(true)` call, or a `VarHandle` 
> for the `HashSet.map` field.

Yes, this test fails with IllegalAccessException. Probably it's easiest to use 
a VarHandle to get private fields, similar to other usage already in this test.

This test case is a bit odd though in that it's supposed to test HashSet and 
LinkedHashSet but it mostly actually tests HashMap. It creates the Set instance 
and immediately extracts the HashMap, which is then passed to the actual test, 
which operates directly on the HashMap. It would be preferable to create a Set; 
add an element (so that it's properly allocated); and then make assertions over 
the Set (which involve extracting the HashMap, etc.) It seems like there should 
be factoring that allows this sort of arrangement to be retrofitted without 
adding too much complication.

Finally, please add "8284780" to the `@bug` line at the top of this test.

-

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


Re: RFR: 8284780: Need methods to create pre-sized HashSet and LinkedHashSet [v10]

2022-05-24 Thread Stuart Marks
On Tue, 24 May 2022 21:37:52 GMT, XenoAmess  wrote:

>> as title.
>
> XenoAmess has updated the pull request incrementally with one additional 
> commit since the last revision:
> 
>   add test for newHashSet and newLinkedHashSet

I looked at all the use sites and they look fine. Some look like they could use 
additional cleanup, but that's probably beyond the scope of this change. (Also, 
I haven't seen `StringTokenizer` in a long time) It's amazing how many bugs 
there are -- the majority look like they allocated the HashSet with the wrong 
capacity! Again, this proves the worth of these new APIs.

src/java.base/share/classes/java/util/HashSet.java line 398:

> 396: public static  HashSet newHashSet(int numItems) {
> 397: return new HashSet<>(HashMap.calculateHashMapCapacity(numItems));
> 398: }

Please use "elements" instead of "items" throughout the specifications for the 
objects that are members of the HashSet. This includes the API notes above as 
well as the specs and API notes in LinkedHashSet.

-

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


Re: RFR: 8284780: Need methods to create pre-sized HashSet and LinkedHashSet [v10]

2022-05-24 Thread liach
On Tue, 24 May 2022 21:37:52 GMT, XenoAmess  wrote:

>> as title.
>
> XenoAmess has updated the pull request incrementally with one additional 
> commit since the last revision:
> 
>   add test for newHashSet and newLinkedHashSet

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

> 352: rsc("rsls", size, cap, () -> {
> 353: try {
> 354: Field mapField = 
> HashSet.class.getDeclaredField("map");

For clarity, consider using var handle/method handle and keep the reflection 
code in the `WhiteBoxResizeTest` constructor.

-

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


Re: RFR: 8284780: Need methods to create pre-sized HashSet and LinkedHashSet [v10]

2022-05-24 Thread ExE Boss
On Tue, 24 May 2022 21:37:52 GMT, XenoAmess  wrote:

>> as title.
>
> XenoAmess has updated the pull request incrementally with one additional 
> commit since the last revision:
> 
>   add test for newHashSet and newLinkedHashSet

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

> 358: throw new RuntimeException(e);
> 359: }
> 360: })

These probably need a `mapField.setAccessible(true)` call, or a `VarHandle` for 
the `HashSet.map` field.

-

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


Re: RFR: 8284780: Need methods to create pre-sized HashSet and LinkedHashSet [v10]

2022-05-24 Thread XenoAmess
> as title.

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

  add test for newHashSet and newLinkedHashSet

-

Changes:
  - all: https://git.openjdk.java.net/jdk/pull/8302/files
  - new: https://git.openjdk.java.net/jdk/pull/8302/files/07e9b8b0..56d029f4

Webrevs:
 - full: https://webrevs.openjdk.java.net/?repo=jdk=8302=09
 - incr: https://webrevs.openjdk.java.net/?repo=jdk=8302=08-09

  Stats: 22 lines in 1 file changed: 21 ins; 0 del; 1 mod
  Patch: https://git.openjdk.java.net/jdk/pull/8302.diff
  Fetch: git fetch https://git.openjdk.java.net/jdk pull/8302/head:pull/8302

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


Re: RFR: 8284780: Need methods to create pre-sized HashSet and LinkedHashSet [v4]

2022-05-24 Thread XenoAmess
On Wed, 18 May 2022 23:20:45 GMT, Stuart Marks  wrote:

>>> Need to add apiNote documentation section to capacity-based constructors 
>>> like for maps.
>> 
>> @liach done.
>
> @XenoAmess oops, sorry for the delay. I think it would be good to get these 
> into 19 as companions to `HashMap.newHashMap` et. al.
> 
> As before, I'd suggest reducing the number of changes to use sites in order 
> to make review easier. I would suggest keeping the changes under src in 
> java.base, java.net.http, java.rmi, and jdk.zipfs, and omitting all the other 
> changes. Also keep the changes under test/jdk.
> 
> There needs to be a test for these new methods. I haven't thought much how to 
> do that. My first attempt would be to modify our favorite WhiteBoxResizeTest 
> and add a bit of machinery that asserts the table length of the HashMap 
> contained within the created HashSet/LinkedHashSet. I haven't looked at it 
> though, so it might not work out, in which case you should pursue an 
> alternative approach.
> 
> I'll look at the specs and suggest updates as necessary and then handle 
> filing of a CSR.

@stuart-marks

> suggest keeping the changes under src in java.base, java.net.http, java.rmi, 
> and jdk.zipfs, and omitting all the other changes. Also keep the changes 
> under test/jdk.

Done.

> modify our favorite WhiteBoxResizeTest and add a bit of machinery that 
> asserts the table length of the HashMap contained within the created 
> HashSet/LinkedHashSet.

I'm trying.

-

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


Re: RFR: 8284780: Need methods to create pre-sized HashSet and LinkedHashSet [v9]

2022-05-24 Thread XenoAmess
> as title.

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

  revert much too changes for newHashSet

-

Changes:
  - all: https://git.openjdk.java.net/jdk/pull/8302/files
  - new: https://git.openjdk.java.net/jdk/pull/8302/files/363fcc50..07e9b8b0

Webrevs:
 - full: https://webrevs.openjdk.java.net/?repo=jdk=8302=08
 - incr: https://webrevs.openjdk.java.net/?repo=jdk=8302=07-08

  Stats: 59 lines in 27 files changed: 9 ins; 0 del; 50 mod
  Patch: https://git.openjdk.java.net/jdk/pull/8302.diff
  Fetch: git fetch https://git.openjdk.java.net/jdk pull/8302/head:pull/8302

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


Re: RFR: 8284780: Need methods to create pre-sized HashSet and LinkedHashSet [v4]

2022-05-18 Thread Stuart Marks
On Wed, 20 Apr 2022 16:14:42 GMT, XenoAmess  wrote:

>> Need to add apiNote documentation section to capacity-based constructors 
>> like for maps.
>
>> Need to add apiNote documentation section to capacity-based constructors 
>> like for maps.
> 
> @liach done.

@XenoAmess oops, sorry for the delay. I think it would be good to get these 
into 19 as companions to `HashMap.newHashMap` et. al.

As before, I'd suggest reducing the number of changes to use sites in order to 
make review easier. I would suggest keeping the changes under src in java.base, 
java.net.http, java.rmi, and jdk.zipfs, and omitting all the other changes. 
Also keep the changes under test/jdk.

There needs to be a test for these new methods. I haven't thought much how to 
do that. My first attempt would be to modify our favorite WhiteBoxResizeTest 
and add a bit of machinery that asserts the table length of the HashMap 
contained within the created HashSet/LinkedHashSet. I haven't looked at it 
though, so it might not work out, in which case you should pursue an 
alternative approach.

I'll look at the specs and suggest updates as necessary and then handle filing 
of a CSR.

-

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


Re: RFR: 8284780: Need methods to create pre-sized HashSet and LinkedHashSet [v8]

2022-04-20 Thread XenoAmess
> as title.

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

  add more replaces

-

Changes:
  - all: https://git.openjdk.java.net/jdk/pull/8302/files
  - new: https://git.openjdk.java.net/jdk/pull/8302/files/704e895b..363fcc50

Webrevs:
 - full: https://webrevs.openjdk.java.net/?repo=jdk=8302=07
 - incr: https://webrevs.openjdk.java.net/?repo=jdk=8302=06-07

  Stats: 2 lines in 2 files changed: 0 ins; 0 del; 2 mod
  Patch: https://git.openjdk.java.net/jdk/pull/8302.diff
  Fetch: git fetch https://git.openjdk.java.net/jdk pull/8302/head:pull/8302

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


Re: RFR: 8284780: Need methods to create pre-sized HashSet and LinkedHashSet [v7]

2022-04-20 Thread XenoAmess
> as title.

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

  add more replaces

-

Changes:
  - all: https://git.openjdk.java.net/jdk/pull/8302/files
  - new: https://git.openjdk.java.net/jdk/pull/8302/files/53fdb7cd..704e895b

Webrevs:
 - full: https://webrevs.openjdk.java.net/?repo=jdk=8302=06
 - incr: https://webrevs.openjdk.java.net/?repo=jdk=8302=05-06

  Stats: 2 lines in 1 file changed: 0 ins; 0 del; 2 mod
  Patch: https://git.openjdk.java.net/jdk/pull/8302.diff
  Fetch: git fetch https://git.openjdk.java.net/jdk pull/8302/head:pull/8302

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


Re: RFR: 8284780: Need methods to create pre-sized HashSet and LinkedHashSet [v6]

2022-04-20 Thread XenoAmess
> as title.

XenoAmess has updated the pull request incrementally with two additional 
commits since the last revision:

 - add more replaces
 - add more replaces

-

Changes:
  - all: https://git.openjdk.java.net/jdk/pull/8302/files
  - new: https://git.openjdk.java.net/jdk/pull/8302/files/26bb5792..53fdb7cd

Webrevs:
 - full: https://webrevs.openjdk.java.net/?repo=jdk=8302=05
 - incr: https://webrevs.openjdk.java.net/?repo=jdk=8302=04-05

  Stats: 28 lines in 16 files changed: 0 ins; 0 del; 28 mod
  Patch: https://git.openjdk.java.net/jdk/pull/8302.diff
  Fetch: git fetch https://git.openjdk.java.net/jdk pull/8302/head:pull/8302

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


Re: RFR: 8284780: Need methods to create pre-sized HashSet and LinkedHashSet [v4]

2022-04-20 Thread XenoAmess
On Tue, 19 Apr 2022 22:17:54 GMT, liach  wrote:

> Need to add apiNote documentation section to capacity-based constructors like 
> for maps.

@liach done.

-

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


Re: RFR: 8284780: Need methods to create pre-sized HashSet and LinkedHashSet [v5]

2022-04-20 Thread XenoAmess
> as title.

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

  add apiNote s

-

Changes:
  - all: https://git.openjdk.java.net/jdk/pull/8302/files
  - new: https://git.openjdk.java.net/jdk/pull/8302/files/f051c1fa..26bb5792

Webrevs:
 - full: https://webrevs.openjdk.java.net/?repo=jdk=8302=04
 - incr: https://webrevs.openjdk.java.net/?repo=jdk=8302=03-04

  Stats: 16 lines in 2 files changed: 16 ins; 0 del; 0 mod
  Patch: https://git.openjdk.java.net/jdk/pull/8302.diff
  Fetch: git fetch https://git.openjdk.java.net/jdk pull/8302/head:pull/8302

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


Re: RFR: 8284780: Need methods to create pre-sized HashSet and LinkedHashSet [v4]

2022-04-20 Thread XenoAmess
On Tue, 19 Apr 2022 20:15:08 GMT, XenoAmess  wrote:

>> as title.
>
> XenoAmess has refreshed the contents of this pull request, and previous 
> commits have been removed. The incremental views will show differences 
> compared to the previous content of the PR. The pull request contains two new 
> commits since the last revision:
> 
>  - migrate HashSet usages
>  - migrate LinkedHashSet usage

> /csr needed

@stuart-marks csr please

-

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


Re: RFR: 8284780: Need methods to create pre-sized HashSet and LinkedHashSet [v4]

2022-04-19 Thread liach
On Tue, 19 Apr 2022 20:15:08 GMT, XenoAmess  wrote:

>> as title.
>
> XenoAmess has refreshed the contents of this pull request, and previous 
> commits have been removed. The incremental views will show differences 
> compared to the previous content of the PR. The pull request contains two new 
> commits since the last revision:
> 
>  - migrate HashSet usages
>  - migrate LinkedHashSet usage

Need to add apiNote documentation section to capacity-based constructors like 
for maps.

-

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


Re: RFR: 8284780: Need methods to create pre-sized HashSet and LinkedHashSet [v4]

2022-04-19 Thread XenoAmess
> as title.

XenoAmess has refreshed the contents of this pull request, and previous commits 
have been removed. The incremental views will show differences compared to the 
previous content of the PR. The pull request contains two new commits since the 
last revision:

 - migrate HashSet usages
 - migrate LinkedHashSet usage

-

Changes:
  - all: https://git.openjdk.java.net/jdk/pull/8302/files
  - new: https://git.openjdk.java.net/jdk/pull/8302/files/e052c34f..f051c1fa

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

  Stats: 3 lines in 2 files changed: 0 ins; 1 del; 2 mod
  Patch: https://git.openjdk.java.net/jdk/pull/8302.diff
  Fetch: git fetch https://git.openjdk.java.net/jdk pull/8302/head:pull/8302

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


Re: RFR: 8284780: Need methods to create pre-sized HashSet and LinkedHashSet [v3]

2022-04-19 Thread XenoAmess
> as title.

XenoAmess has updated the pull request incrementally with two additional 
commits since the last revision:

 - migrate HashSet usages
 - migrate LinkedHashSet usage

-

Changes:
  - all: https://git.openjdk.java.net/jdk/pull/8302/files
  - new: https://git.openjdk.java.net/jdk/pull/8302/files/b139366c..e052c34f

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

  Stats: 67 lines in 43 files changed: 1 ins; 9 del; 57 mod
  Patch: https://git.openjdk.java.net/jdk/pull/8302.diff
  Fetch: git fetch https://git.openjdk.java.net/jdk pull/8302/head:pull/8302

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


Re: RFR: 8284780: Need methods to create pre-sized HashSet and LinkedHashSet [v2]

2022-04-19 Thread XenoAmess
> as title.

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

  fix LinkedHashSet constructor

-

Changes:
  - all: https://git.openjdk.java.net/jdk/pull/8302/files
  - new: https://git.openjdk.java.net/jdk/pull/8302/files/436273ed..b139366c

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

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

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


RFR: 8284780: Need methods to create pre-sized HashSet and LinkedHashSet

2022-04-19 Thread XenoAmess
as title.

-

Commit messages:
 - 8284780: Need methods to create pre-sized HashSet and LinkedHashSet

Changes: https://git.openjdk.java.net/jdk/pull/8302/files
 Webrev: https://webrevs.openjdk.java.net/?repo=jdk=8302=00
  Issue: https://bugs.openjdk.java.net/browse/JDK-8284780
  Stats: 34 lines in 2 files changed: 34 ins; 0 del; 0 mod
  Patch: https://git.openjdk.java.net/jdk/pull/8302.diff
  Fetch: git fetch https://git.openjdk.java.net/jdk pull/8302/head:pull/8302

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