On Wed, 18 May 2022 23:20:45 GMT, Stuart Marks <sma...@openjdk.org> 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