RFR(S) 8235970 [TESTBUG] Remove dependency of sun.tools.jar from RedefineClassHelper

Ioi Lam ioi.lam at oracle.com
Mon Dec 16 18:40:51 UTC 2019


Hi Alan,

Thanks for the review and the tip. I will use ToolProvider for
JDK-8236028 [TESTBUG] Remove dependency of sun.tools.jar from 
appcds/JarBuilder

- Ioi

On 12/15/19 11:22 PM, 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