On Wed, 25 May 2022 05:22:44 GMT, Stuart Marks <sma...@openjdk.org> 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