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

Reply via email to