JDK-8066847 : jdk/test/lib/testlibrary/jdk/testlibrary/ProcessTools.java, to eliminate dependency on sun.management.VMManagement
  • Type: Bug
  • Component: core-svc
  • Affected Version: 9
  • Priority: P2
  • Status: Resolved
  • Resolution: Duplicate
  • Submitted: 2014-12-08
  • Updated: 2016-01-06
  • Resolved: 2015-02-12
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 9
9Resolved
Related Reports
Blocks :  
Duplicate :  
Relates :  
Description
In Jigsaw Milestone Ana, module boundaries will be enforced. Tests that use JDK internal APIs require adjustments to work with module boundaries. 

jdk test lib/testlibrary/jdk/testlibrary/ProcessTools.java getProcessId() use internal APIs for getting current process id, this should be re-examined.

To remove the dependency on sun.management.VMManagement in this test lib, it's possible to use a standard library API for getting the process id:
- Enhance Process API in JDK-8046092 JEP 102: Process API Updates

ProcessTools.java getProcessId() is used in below tests:
com/sun/management/HotSpotDiagnosticMXBean/CheckOrigin.java
sun/tools/jcmd/TestJcmdSanity.java
sun/tools/jmap/BasicJMapTest.java
sun/tools/jps/JpsBase.java
sun/tools/jstack/BasicJStackTest.java
sun/tools/jstatd/JstatdTest.java