RFR: 8078144 many nightly tests failed due to NoSuchMethodError: sun.management.ManagementFactoryHelper.getDiagnosticMXBean

Alan Bateman Alan.Bateman at oracle.com
Tue Apr 21 07:05:56 UTC 2015


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.

-Alan.


More information about the serviceability-dev mailing list