Buggy code:
public class LoggingExtension implements Extension { public static final String SUBSYSTEM_NAME = "logging" ; public static final PathElement rootLoggerPath = PathElement . pathElement ( ROOT_LOGGER , ROOT_LOGGER_NAME ) ; private static final PathElement loggersPath = PathElement . pathElement ( LOGGER ) ; private static final PathElement asyncHandlersPath = PathElement . pathElement ( ASYNC_HANDLER ) ; private static final PathElement consoleHandlersPath = PathElement . pathElement ( CONSOLE_HANDLER ) ; private static final PathElement customHandlerPath = PathElement . pathElement ( CUSTOM_HANDLER ) ; private static final PathElement fileHandlersPath = PathElement . pathElement ( FILE_HANDLER ) ; private static final PathElement periodicHandlersPath = PathElement . pathElement ( PERIODIC_ROTATING_FILE_HANDLER ) ; private static final PathElement sizePeriodicHandlersPath = PathElement . pathElement ( SIZE_ROTATING_FILE_HANDLER ) ; @ Override public void initialize ( ExtensionContext context ) { final SubsystemRegistration subsystem = context . registerSubsystem ( LoggingExtension . SUBSYSTEM_NAME ) ; final ManagementResourceRegistration registration = subsystem . registerSubsystemModel ( SUBSYSTEM ) ; registration . registerOperationHandler ( ADD , LoggingExtension . NewLoggingSubsystemAdd . ADD_INSTANCE , SUBSYSTEM_ADD , false ) ; registration . registerOperationHandler ( DESCRIBE , INSTANCE , INSTANCE , false , PRIVATE ) ; registration . registerOperationHandler ( REMOVE , ReloadRequiredRemoveStepHandler . INSTANCE , SUBSYSTEM_REMOVE , false ) ; subsystem . registerXMLElementWriter ( LoggingSubsystemParser . INSTANCE ) ; final ManagementResourceRegistration rootLogger = registration . registerSubModel ( LoggingExtension . rootLoggerPath , LoggingSubsystemProviders . ROOT_LOGGER ) ; <START_BUG> rootLogger . registerOperationHandler ( OPERATION_NAME , RootLoggerAdd . INSTANCE , SET_ROOT_LOGGER , false ) ; <END_BUG> rootLogger . registerOperationHandler ( RootLoggerRemove . OPERATION_NAME , RootLoggerRemove . INSTANCE , REMOVE_ROOT_LOGGER , false ) ; rootLogger . registerOperationHandler ( RootLoggerLevelChange . OPERATION_NAME , RootLoggerLevelChange . INSTANCE , ROOT_LOGGER_CHANGE_LEVEL , false ) ; rootLogger . registerOperationHandler ( RootLoggerAssignHandler . OPERATION_NAME , RootLoggerAssignHandler . INSTANCE , ROOT_LOGGER_ASSIGN_HANDLER , false ) ; rootLogger . registerOperationHandler ( RootLoggerUnassignHandler . OPERATION_NAME , RootLoggerUnassignHandler . INSTANCE , ROOT_LOGGER_UNASSIGN_HANDLER , false ) ; addWriteAttributes ( rootLogger , RootLoggerWriteAttributeHandler . INSTANCE ) ; final ManagementResourceRegistration loggers = registration . registerSubModel ( LoggingExtension . loggersPath , LoggingSubsystemProviders . LOGGER ) ; loggers . registerOperationHandler ( ADD , LoggerAdd . INSTANCE , LOGGER_ADD , false ) ; loggers . registerOperationHandler ( REMOVE , LoggerRemove . INSTANCE , LOGGER_REMOVE , false ) ; loggers . registerOperationHandler ( LoggerLevelChange . OPERATION_NAME , LoggerLevelChange . INSTANCE , LOGGER_CHANGE_LEVEL , false ) ; loggers . registerOperationHandler ( LoggerAssignHandler . OPERATION_NAME , LoggerAssignHandler . INSTANCE , LOGGER_ASSIGN_HANDLER , false ) ; loggers . registerOperationHandler ( LoggerUnassignHandler . OPERATION_NAME , LoggerUnassignHandler . INSTANCE , LOGGER_UNASSIGN_HANDLER , false ) ; addWriteAttributes ( loggers , LoggerWriteAttributeHandler . INSTANCE ) ; final ManagementResourceRegistration asyncHandler = registration . registerSubModel ( LoggingExtension . asyncHandlersPath , LoggingSubsystemProviders . ASYNC_HANDLER ) ; asyncHandler . registerOperationHandler ( ADD , AsyncHandlerAdd . INSTANCE , ASYNC_HANDLER_ADD , false ) ; asyncHandler . registerOperationHandler ( REMOVE , LoggerHandlerRemove . INSTANCE , HANDLER_REMOVE , false ) ; asyncHandler . registerOperationHandler ( ENABLE , HandlerEnable . INSTANCE , HANDLER_ENABLE , false ) ; asyncHandler . registerOperationHandler ( DISABLE , HandlerDisable . INSTANCE , HANDLER_DISABLE , false ) ; asyncHandler . registerOperationHandler ( HandlerLevelChange . OPERATION_NAME , HandlerLevelChange . INSTANCE , HANDLER_CHANGE_LEVEL , false ) ; asyncHandler . registerOperationHandler ( AsyncHandlerUpdateProperties . OPERATION_NAME , AsyncHandlerUpdateProperties . INSTANCE , ASYNC_HANDLER_UPDATE , false ) ; asyncHandler . registerOperationHandler ( AsyncHandlerAssignSubhandler . OPERATION_NAME , AsyncHandlerAssignSubhandler . INSTANCE , ASYNC_HANDLER_ASSIGN_SUBHANDLER , false ) ; asyncHandler . registerOperationHandler ( AsyncHandlerUnassignSubhandler . OPERATION_NAME , AsyncHandlerUnassignSubhandler . INSTANCE , ASYNC_HANDLER_UNASSIGN_SUBHANDLER , false ) ; addWriteAttributes ( asyncHandler , AsyncHandlerWriteAttributeHandler . INSTANCE ) ; final ManagementResourceRegistration consoleHandler = registration . registerSubModel ( LoggingExtension . consoleHandlersPath , LoggingSubsystemProviders . CONSOLE_HANDLER ) ; consoleHandler . registerOperationHandler ( ADD , ConsoleHandlerAdd . INSTANCE , CONSOLE_HANDLER_ADD , false ) ; consoleHandler . registerOperationHandler ( REMOVE , LoggerHandlerRemove . INSTANCE , HANDLER_REMOVE , false ) ; consoleHandler . registerOperationHandler ( ENABLE , HandlerEnable . INSTANCE , HANDLER_ENABLE , false ) ; consoleHandler . registerOperationHandler ( DISABLE , HandlerDisable . INSTANCE , HANDLER_DISABLE , false ) ; consoleHandler . registerOperationHandler ( HandlerLevelChange . OPERATION_NAME , HandlerLevelChange . INSTANCE , HANDLER_CHANGE_LEVEL , false ) ; consoleHandler . registerOperationHandler ( ConsoleHandlerUpdateProperties . OPERATION_NAME , ConsoleHandlerUpdateProperties . INSTANCE , CONSOLE_HANDLER_UPDATE , false ) ; addWriteAttributes ( consoleHandler , ConsoleHandlerWriteAttributeHandler . INSTANCE ) ; final ManagementResourceRegistration fileHandler = registration . registerSubModel ( LoggingExtension . fileHandlersPath , LoggingSubsystemProviders . FILE_HANDLER ) ; fileHandler . registerOperationHandler ( ADD , FileHandlerAdd . INSTANCE , FILE_HANDLER_ADD , false ) ; fileHandler . registerOperationHandler ( REMOVE , LoggerFileHandlerRemove . INSTANCE , HANDLER_REMOVE , false ) ; fileHandler . registerOperationHandler ( ENABLE , HandlerEnable . INSTANCE , HANDLER_ENABLE , false ) ; fileHandler . registerOperationHandler ( DISABLE , HandlerDisable . INSTANCE , HANDLER_DISABLE , false ) ; fileHandler . registerOperationHandler ( HandlerLevelChange . OPERATION_NAME , HandlerLevelChange . INSTANCE , HANDLER_CHANGE_LEVEL , false ) ; fileHandler . registerOperationHandler ( HandlerFileChange . OPERATION_NAME , HandlerFileChange . INSTANCE , HANDLER_CHANGE_FILE , false ) ; fileHandler . registerOperationHandler ( FileHandlerUpdateProperties . OPERATION_NAME , FileHandlerUpdateProperties . INSTANCE , FILE_HANDLER_UPDATE , false ) ; addWriteAttributes ( fileHandler , FileHandlerWriteAttributeHandler . INSTANCE ) ; final ManagementResourceRegistration periodicHandler = registration . registerSubModel ( LoggingExtension . periodicHandlersPath , PERIODIC_HANDLER ) ; periodicHandler . registerOperationHandler ( ADD , PeriodicRotatingFileHandlerAdd . INSTANCE , PERIODIC_HANDLER_ADD , false ) ; periodicHandler . registerOperationHandler ( REMOVE , LoggerFileHandlerRemove . INSTANCE , HANDLER_REMOVE , false ) ; periodicHandler . registerOperationHandler ( ENABLE , HandlerEnable . INSTANCE , HANDLER_ENABLE , false ) ; periodicHandler . registerOperationHandler ( DISABLE , HandlerDisable . INSTANCE , HANDLER_DISABLE , false ) ; periodicHandler . registerOperationHandler ( HandlerLevelChange . OPERATION_NAME , HandlerLevelChange . INSTANCE , HANDLER_CHANGE_LEVEL , false ) ; periodicHandler . registerOperationHandler ( HandlerFileChange . OPERATION_NAME , HandlerFileChange . INSTANCE , HANDLER_CHANGE_FILE , false ) ; periodicHandler . registerOperationHandler ( PeriodicHandlerUpdateProperties . OPERATION_NAME , PeriodicHandlerUpdateProperties . INSTANCE , PERIODIC_HANDLER_UPDATE , false ) ; addWriteAttributes ( periodicHandler , PeriodicHandlerWriteAttributeHandler . INSTANCE ) ; final ManagementResourceRegistration sizePeriodicHandler = registration . registerSubModel ( LoggingExtension . sizePeriodicHandlersPath , SIZE_PERIODIC_HANDLER ) ;

Fix:
rootLogger . registerOperationHandler ( OPERATION_NAME , RootLoggerAdd . INSTANCE , ADD_ROOT_LOGGER , false ) ;