Alan Bateman wrote:
On 21/04/2015 08:01, Shanliang Jiang wrote:
Hi,
Please review this test fix:
webrev: http://cr.openjdk.java.net/~sjiang/JDK-8078144/00/
bug: https://bugs.openjdk.java.net/browse/JDK-8078144
The method sun.management.ManagementFactoryHelper.getDiagnosticMXBean
was removed because HotSpotDiagnosticMXBean is not in java.management
module but in jdk.management module, to get the
HotSpotDiagnosticMXBean we should call:
ManagementFactory.getPlatformMXBean(HotSpotDiagnosticMXBean.class)
I passed all failed tests with the fix.
I see JInfoRunningProcessFlagTest still imports
sun.management.ManagementFactoryHelper. Best to remove that now as
otherwise this issue will come back again once javac has support for
modules. Otherwise looks okay to me.
OK I have removed that useless import, here is the new version:
http://cr.openjdk.java.net/~sjiang/JDK-8078144/01/
by the way the test JInfoRunningProcessFlagTest is in
jdk/test/ProblemList.txt and I found the issue by "find ./ -name
"*.java" |xargs grep ManagementFactoryHelper.getDiagnosticMXBean ". So
my fix just makes it compilable but it still fails
Thanks,
Shanliang