RFR: 8263412: ClassFileInstaller can't be used by classes outside of default package

Igor Ignatyev iignatyev at openjdk.java.net
Fri Mar 12 23:16:06 UTC 2021

On Fri, 12 Mar 2021 02:08:09 GMT, Mikhailo Seledtsov <mseledtsov at openjdk.org> wrote:

>> Hi all,
>> could you please review the patch which moves `ClassFileInstaller` class to `jdk.test.lib.helpers` package? 
>> to reduce changes in the tests, `ClassFileInstaller` in the default package is kept w/ just `main` method that calls  `jdk.test.lib.helpers. ClassFileInstaller::main`. 
>> from JBS:
>>> ClassFileInstaller is in the default package hence it's impossible to use it directly by classes in any other package. although ClassFileInstaller is mainly used directly from jtreg test description, there are cases when one needs to use it in another "driver" class (e.g. to reduce boilerplate), yet to do. that these driver classes have to either be in a default package or use reflection, both approaches have drawbacks. 
>>> to solve that, we can move ClassFileInstaller implementation to a package, and to avoid unneeded churn, keep package-less ClassFileInstaller class which will call package-full impl.
>>> the need for this patch has raised as part of [JDK-8254129](https://bugs.openjdk.java.net/browse/JDK-8254129).
>> testing:
>> - [x] `:jdk_core` against `{macos,windows,linux}-x64`
>> - [x] `:jdk_svc` against `{macos,windows,linux}-x64`
>> - [x] `test/hotspot/jtreg` w/o `applications` and `vmTestbase` directories against `{macos,windows,linux}-x64`
>> Thanks,
>> -- Igor
> Marked as reviewed by mseledtsov (Committer).

Ioi, Coleen, Misha, thanks for your reviews.

-- Igor


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

More information about the security-dev mailing list