RFR: JDK-8185003 JMX: Add a version of ThreadMXBean.dumpAllThreads with a maxDepth argument

mandy chung mandy.chung at oracle.com
Tue Aug 8 17:29:04 UTC 2017



On 8/8/17 10:18 AM, Daniel Fuchs wrote:
>
> That's what will happen if someone had a custom implementation
> of ThreadMXBean which is compiled against JDK 9 but runs in JDK 10,
> and therefore does not have the new methods. Then it inherits
> the default body that throes UOE.

I'm not aware of any custom implementation of the platform mxbean. I 
would expect only JVM implementations would do that.  The API was 
evolved in the past and haven't heard such issue.
>
> With the default body then the implementation can still be compiled
> against jdk 10, without having to add the new method.
> :
>
> This means that you can evolve MBean interfaces by adding methods
> to them as long as you provide a default body (which is rather cool :-))
>
I understand the nice benefit.   IMO I don't think it's highly necessary 
since these MBeans are expected to be provided by the platform.

Mandy


More information about the serviceability-dev mailing list