RFR: 8280041: Retry loop issues in java.io.ClassCache
Aleksey Shipilev
shade at openjdk.java.net
Wed Jan 19 08:23:00 UTC 2022
On Tue, 18 Jan 2022 20:07:10 GMT, Roger Riggs <rriggs at openjdk.org> wrote:
> It may not be worth it. If not, add the label "noreg-hard".
Added.
> It is possible for add to the test description the modules to be opened:
> ```
> * @modules java.base/java.io:open
> ```
>
> jtreg will add the appropriate command line args when it is compiled and run. There are various examples in existing test/jdk/java/io... tests.
It is not about modules protection, it is about the plain Java rule: the class is package-private, you cannot subclass from it, unless you are in the same package, period. In older Java days you would "just" put the test in the same package, but we cannot do it now, because that would be a split package and test code would refuse to load. But there is a way to inject `java.io` classes, apparently! I added two tests in two new commits.
-------------
PR: https://git.openjdk.java.net/jdk/pull/7092
More information about the core-libs-dev
mailing list