RFR(S) 8235970 [TESTBUG] Remove dependency of sun.tools.jar from RedefineClassHelper
Alan Bateman
Alan.Bateman at oracle.com
Mon Dec 16 07:22:07 UTC 2019
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