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

Ioi Lam ioi.lam at oracle.com
Mon Dec 16 06:21:24 UTC 2019


https://bugs.openjdk.java.net/browse/JDK-8235970
http://cr.openjdk.java.net/~iklam/jdk15/8235970-RedefineClassHelper-no-sun-tools-jar.v01/

test/lib/RedefineClassHelper.java uses the internal sun.tools.jar.Main class
directly, causing a warning from javac. As a result, all tests that use
RedefineClassHelper need to have this line for the additional module 
dependency.

    @modules jdk.jartool/sun.tools.jar

The fix is to rewrite RedefineClassHelper to use ClassFileInstaller instead.

I removed "@modules jdk.jartool/sun.tools.jar" for all users of
RedefineClassHelper, except for the following (which use
sun.tools.jar.Main directly).

     test/hotspot/jtreg/serviceability/jvmti/RedefineClasses/*

-----

Testing with hs-tier1,hs-tier2,hs-tier5-svc which cover all the affected 
test cases.

Thanks
- Ioi



More information about the serviceability-dev mailing list