RFR(S) 8235970 [TESTBUG] Remove dependency of sun.tools.jar from RedefineClassHelper
serguei.spitsyn at oracle.com
serguei.spitsyn at oracle.com
Mon Dec 16 23:33:31 UTC 2019
Hi Ioi,
It looks good.
It is nice to get rid of unneeded dependency.
Thanks,
Serguei
On 12/15/19 23:22, Alan Bateman wrote:
> On 16/12/2019 06:21, Ioi Lam wrote:
>> :
>>
>> The fix is to rewrite RedefineClassHelper to use ClassFileInstaller
>> instead.
> This looks okay but just to point out that the jar tool can be
> obtained via ToolProvider, e.g.
> ToolProvider jarTool = ToolProvider.findFirst("jar").orElseThrow();
>
> so RedefineClassHelper, or better still ClassFileInstaller, could use
> that for cases where JAR files need to be created or updated in ways
> that would be easier if the jar tool could be used in the test. Avoids
> using some of the prickly APIs in java.util.zip|jar.
>
> -Alan
More information about the serviceability-dev
mailing list