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 [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 [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 [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 [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&pr=8302&range=03
 - incr: https://webrevs.openjdk.java.net/?repo=jdk&pr=8302&range=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