Buggy code:
ManagementResourceRegistration classloading = root . registerSubModel ( PlatformMBeanConstants . CLASS_LOADING_PATH , new DescriptionProvider ( ) { @ Override public ModelNode getModelDescription ( Locale locale ) { return PlatformMBeanDescriptions . getClassLoadingResource ( locale ) ; } } ) ; INSTANCE . register ( classloading ) ; if ( ( ManagementFactory . getCompilationMXBean ( ) ) != null ) { ManagementResourceRegistration compilation = root . registerSubModel ( PlatformMBeanConstants . COMPILATION_PATH , new DescriptionProvider ( ) { @ Override public ModelNode getModelDescription ( Locale locale ) { return PlatformMBeanDescriptions . getCompilationResource ( locale ) ; } } ) ; compilation . registerOperationHandler ( READ_RESOURCE_OPERATION , CompilationMXBeanReadResourceHandler . INSTANCE , READ_RESOURCE_PROVIDER ) ; CompilationMXBeanAttributeHandler . INSTANCE . register ( compilation ) ; } ManagementResourceRegistration gcRoot = root . registerSubModel ( PlatformMBeanConstants . GARBAGE_COLLECTOR_PATH , new DescriptionProvider ( ) { @ Override public ModelNode getModelDescription ( Locale locale ) { return PlatformMBeanDescriptions . getGarbageCollectorRootResource ( locale ) ; } } ) ; ManagementResourceRegistration gc = gcRoot . registerSubModel ( PathElement . pathElement ( NAME ) , new DescriptionProvider ( ) { @ Override public ModelNode getModelDescription ( Locale locale ) { return PlatformMBeanDescriptions . getGarbageCollectorResource ( locale ) ; } } ) ; GarbageCollectorMXBeanAttributeHandler . INSTANCE . register ( gc ) ; ManagementResourceRegistration memMgrRoot = root . registerSubModel ( PlatformMBeanConstants . MEMORY_MANAGER_PATH , new DescriptionProvider ( ) { @ Override public ModelNode getModelDescription ( Locale locale ) { return PlatformMBeanDescriptions . getMemoryManagerRootResource ( locale ) ; } } ) ; ManagementResourceRegistration memMgr = memMgrRoot . registerSubModel ( PathElement . pathElement ( NAME ) , new DescriptionProvider ( ) { @ Override public ModelNode getModelDescription ( Locale locale ) { return PlatformMBeanDescriptions . getMemoryManagerResource ( locale ) ; } } ) ; MemoryManagerMXBeanAttributeHandler . INSTANCE . register ( memMgr ) ; ManagementResourceRegistration memory = root . registerSubModel ( PlatformMBeanConstants . MEMORY_PATH , new DescriptionProvider ( ) { @ Override public ModelNode getModelDescription ( Locale locale ) { return PlatformMBeanDescriptions . getMemoryResource ( locale ) ; } } ) ; MemoryMXBeanAttributeHandler . INSTANCE . register ( memory ) ; memory . registerOperationHandler ( GC , MemoryMXBeanGCHandler . INSTANCE , MemoryMXBeanGCHandler . INSTANCE ) ; ManagementResourceRegistration memPoolRoot = root . registerSubModel ( PlatformMBeanConstants . MEMORY_POOL_PATH , new DescriptionProvider ( ) { @ Override public ModelNode getModelDescription ( Locale locale ) { return PlatformMBeanDescriptions . getMemoryPoolRootResource ( locale ) ; } } ) ; ManagementResourceRegistration memPool = memPoolRoot . registerSubModel ( PathElement . pathElement ( NAME ) , new DescriptionProvider ( ) { @ Override public ModelNode getModelDescription ( Locale locale ) { return PlatformMBeanDescriptions . getMemoryPoolResource ( locale ) ; } } ) ; memPool . registerOperationHandler ( READ_RESOURCE_OPERATION , MemoryPoolMXBeanReadResourceHandler . INSTANCE , READ_RESOURCE_PROVIDER ) ; memPool . registerOperationHandler ( PlatformMBeanConstants . RESET_PEAK_USAGE , MemoryPoolMXBeanResetPeakUsageHandler . INSTANCE , MemoryPoolMXBeanResetPeakUsageHandler . INSTANCE ) ; MemoryPoolMXBeanAttributeHandler . INSTANCE . register ( memPool ) ; ManagementResourceRegistration opSys = root . registerSubModel ( PlatformMBeanConstants . OPERATING_SYSTEM_PATH , new DescriptionProvider ( ) { @ Override public ModelNode getModelDescription ( Locale locale ) { return PlatformMBeanDescriptions . getOperatingSystemResource ( locale ) ; } } ) ; opSys . registerOperationHandler ( READ_RESOURCE_OPERATION , OperatingSystemMXBeanReadResourceHandler . INSTANCE , READ_RESOURCE_PROVIDER ) ; OperatingSystemMXBeanAttributeHandler . INSTANCE . register ( opSys ) ; ManagementResourceRegistration runtime = root . registerSubModel ( PlatformMBeanConstants . RUNTIME_PATH , new DescriptionProvider ( ) { @ Override public ModelNode getModelDescription ( Locale locale ) { return PlatformMBeanDescriptions . getRuntimeResource ( locale ) ; } } ) ; runtime . registerOperationHandler ( READ_RESOURCE_OPERATION , RuntimeMXBeanReadResourceHandler . INSTANCE , READ_RESOURCE_PROVIDER ) ; RuntimeMXBeanAttributeHandler . INSTANCE . register ( runtime ) ; ManagementResourceRegistration threads = root . registerSubModel ( PlatformMBeanConstants . THREADING_PATH , new DescriptionProvider ( ) { @ Override public ModelNode getModelDescription ( Locale locale ) { return PlatformMBeanDescriptions . getThreadingResource ( locale ) ; } } ) ; threads . registerOperationHandler ( READ_RESOURCE_OPERATION , ThreadMXBeanReadResourceHandler . INSTANCE , READ_RESOURCE_PROVIDER ) ; threads . registerOperationHandler ( PlatformMBeanConstants . RESET_PEAK_THREAD_COUNT , ThreadMXBeanResetPeakThreadCountHandler . INSTANCE , ThreadMXBeanResetPeakThreadCountHandler . INSTANCE ) ; threads . registerOperationHandler ( PlatformMBeanConstants . FIND_DEADLOCKED_THREADS , ThreadMXBeanFindDeadlockedThreadsHandler . INSTANCE , ThreadMXBeanFindDeadlockedThreadsHandler . INSTANCE ) ; threads . registerOperationHandler ( PlatformMBeanConstants . FIND_MONITOR_DEADLOCKED_THREADS , ThreadMXBeanFindMonitorDeadlockedThreadsHandler . INSTANCE , ThreadMXBeanFindMonitorDeadlockedThreadsHandler . INSTANCE ) ; threads . registerOperationHandler ( PlatformMBeanConstants . GET_THREAD_INFO , ThreadMXBeanThreadInfoHandler . INSTANCE , ThreadMXBeanThreadInfoHandler . INSTANCE ) ; threads . registerOperationHandler ( PlatformMBeanConstants . GET_THREAD_INFOS , ThreadMXBeanThreadInfosHandler . INSTANCE , ThreadMXBeanThreadInfosHandler . INSTANCE ) ; threads . registerOperationHandler ( PlatformMBeanConstants . GET_THREAD_CPU_TIME , ThreadMXBeanCpuTimeHandler . INSTANCE , ThreadMXBeanCpuTimeHandler . INSTANCE ) ; threads . registerOperationHandler ( PlatformMBeanConstants . GET_THREAD_USER_TIME , ThreadMXBeanUserTimeHandler . INSTANCE , ThreadMXBeanUserTimeHandler . INSTANCE ) ; threads . registerOperationHandler ( PlatformMBeanConstants . DUMP_ALL_THREADS , ThreadMXBeanDumpAllThreadsHandler . INSTANCE , ThreadMXBeanDumpAllThreadsHandler . INSTANCE ) ; ThreadMXBeanAttributeHandler . INSTANCE . register ( threads ) ; if ( ( PlatformMBeanUtil . JVM_MAJOR_VERSION ) > 6 ) { ManagementResourceRegistration bufPoolRoot = root . registerSubModel ( PlatformMBeanConstants . BUFFER_POOL_PATH , new DescriptionProvider ( ) { @ Override public ModelNode getModelDescription ( Locale locale ) { return PlatformMBeanDescriptions . getBufferPoolRootResource ( locale ) ; } } ) ; <START_BUG> ManagementResourceRegistration bufPool = memPoolRoot . registerSubModel ( PathElement . pathElement ( NAME ) , new DescriptionProvider ( ) { <END_BUG> @ Override public ModelNode getModelDescription ( Locale locale ) { return PlatformMBeanDescriptions . getBufferPoolResource ( locale ) ; } } ) ; BufferPoolMXBeanAttributeHandler . INSTANCE . register ( bufPool ) ; ManagementResourceRegistration logging = root . registerSubModel ( PlatformMBeanConstants . LOGGING_PATH , new DescriptionProvider ( ) { @ Override public ModelNode getModelDescription ( Locale locale ) { return PlatformMBeanDescriptions . getPlatformLoggingResource ( locale ) ; } } ) ; logging . registerOperationHandler ( PlatformMBeanConstants . GET_LOGGER_LEVEL , PlatformLoggingMXBeanGetLoggerLevelHandler . INSTANCE , PlatformLoggingMXBeanGetLoggerLevelHandler . INSTANCE ) ; logging . registerOperationHandler ( PlatformMBeanConstants . SET_LOGGER_LEVEL , PlatformLoggingMXBeanSetLoggerLevelHandler . INSTANCE , PlatformLoggingMXBeanSetLoggerLevelHandler . INSTANCE ) ; logging . registerOperationHandler ( PlatformMBeanConstants . GET_PARENT_LOGGER_NAME , PlatformLoggingMXBeanGetParentLoggerNameHandler . INSTANCE , PlatformLoggingMXBeanGetParentLoggerNameHandler . INSTANCE ) ; PlatformLoggingMXBeanAttributeHandler . INSTANCE . register ( logging ) ; } } private PlatformMBeanResourceRegistrar ( ) { } }

Fix:
ManagementResourceRegistration bufPool = bufPoolRoot . registerSubModel ( PathElement . pathElement ( NAME ) , new DescriptionProvider ( ) {