Alexandre (Shura) Iline
alexandre.iline at oracle.com
Mon Nov 9 17:54:05 UTC 2015
This is one of the ways to fix 8139430: http://cr.openjdk.java.net/~shurailine/8139430/webrev.03
Could you please take a look on it?
A few comments.
The biggest dependency on java.management was in jdk.testlibrary.ProcessTools.getProcessId() method. I have changed the method to use the new process API, which helped to avoid updating a lot of code.
I am moving the rest library code which depended on java.management and jdk.management to a new “management" subpackage of the jdk library: jdk.testlibrary.management. Another possibility I have considered is “ext” or “extended” subpackage, which would have all the classes which depend on anything but java.base. With “ext” there would be no way to keep the desired granularity with the test modules dependencies.
The methods which worth moving fit well into two classes:
jdk.testlibrary.management.ThreadMXBeanTool - to include a couple of method which previously belonged to the TestThread utility methods.
jdk.testlibrary.management.RuntimeMXBeanTool - previously named as jdk.testlibrary.InputArguments
None of moved/renamed test library methods were used anywhere in tests, so no test updates needed:
jdk.testlibrary.InputArguments is not used, instead every test which needs that functionality directly calls RuntimeMXBean.getInputArguments()
jdk.testlibrary.TestThread.waitUntilBlockingOnObject(Thread, Thread.State, Object) and jdk.testlibrary.TestThread.waitUntilInNative(Thread) also were not used as there is a similar class outside of the test library:
Please let me know what you think.
More information about the jigsaw-dev