On Thu, 11 Mar 2021 05:47:00 GMT, Igor Ignatyev <iignat...@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

This pull request has now been integrated.

Changeset: e834f99d
Author:    Igor Ignatyev <iignat...@openjdk.org>
URL:       https://git.openjdk.java.net/jdk/commit/e834f99d
Stats:     472 lines in 114 files changed: 145 ins; 229 del; 98 mod

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

Reviewed-by: iklam, coleenp, mseledtsov

-------------

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

Reply via email to