Buggy code:
public class JGroupsExtension implements Extension { static final String SUBSYSTEM_NAME = "jgroups" ; private static final PathElement stacksPath = PathElement . pathElement ( STACK ) ; private static final PathElement transportPath = PathElement . pathElement ( TRANSPORT , TRANSPORT_NAME ) ; private static final PathElement protocolPath = PathElement . pathElement ( PROTOCOL ) ; private static final PathElement protocolPropertyPath = PathElement . pathElement ( PROPERTY ) ; private static final int MANAGEMENT_API_MAJOR_VERSION = 1 ; private static final int MANAGEMENT_API_MINOR_VERSION = 1 ; private static final int MANAGEMENT_API_MICRO_VERSION = 0 ; @ Override public void initialize ( ExtensionContext context ) { SubsystemRegistration subsystem = context . registerSubsystem ( JGroupsExtension . SUBSYSTEM_NAME , JGroupsExtension . MANAGEMENT_API_MAJOR_VERSION , JGroupsExtension . MANAGEMENT_API_MINOR_VERSION , JGroupsExtension . MANAGEMENT_API_MICRO_VERSION ) ; subsystem . registerXMLElementWriter ( new JGroupsSubsystemXMLWriter ( ) ) ; ManagementResourceRegistration registration = subsystem . registerSubsystemModel ( SUBSYSTEM ) ; registration . registerOperationHandler ( ADD , INSTANCE , SUBSYSTEM_ADD , false ) ; registration . registerOperationHandler ( REMOVE , JGroupsSubsystemRemove . INSTANCE , SUBSYSTEM_REMOVE , false ) ; registration . registerOperationHandler ( DESCRIBE , JGroupsSubsystemDescribe . INSTANCE , SUBSYSTEM_DESCRIBE , false , PRIVATE ) ; SubsystemWriteAttributeHandler . INSTANCE . registerAttributes ( registration ) ; ManagementResourceRegistration stacks = registration . registerSubModel ( JGroupsExtension . stacksPath , JGroupsSubsystemProviders . STACK ) ; stacks . registerOperationHandler ( ADD , ProtocolStackAdd . INSTANCE , STACK_ADD , false ) ; stacks . registerOperationHandler ( REMOVE , ProtocolStackRemove . INSTANCE , STACK_REMOVE , false ) ; stacks . registerOperationHandler ( ADD_PROTOCOL , PROTOCOL_ADD , JGroupsSubsystemProviders . PROTOCOL_ADD ) ; stacks . registerOperationHandler ( REMOVE_PROTOCOL , PROTOCOL_REMOVE , JGroupsSubsystemProviders . PROTOCOL_REMOVE ) ; if ( context . isRuntimeOnlyRegistrationValid ( ) ) { <START_BUG> final EnumSet < OperationEntry . Flag > readOnly = EnumSet . of ( READ_ONLY ) ; <END_BUG> stacks . registerOperationHandler ( EXPORT_NATIVE_CONFIGURATION , StackConfigOperationHandlers . EXPORT_NATIVE_CONFIGURATION , JGroupsSubsystemProviders . EXPORT_NATIVE_CONFIGURATION , readOnly ) ; } final ManagementResourceRegistration transport = stacks . registerSubModel ( JGroupsExtension . transportPath , JGroupsSubsystemProviders . TRANSPORT ) ; transport . registerOperationHandler ( ModelDescriptionConstants . ADD , TRANSPORT_ADD , JGroupsSubsystemProviders . TRANSPORT_ADD ) ; transport . registerOperationHandler ( ModelDescriptionConstants . REMOVE , StackConfigOperationHandlers . REMOVE , TRANSPORT_REMOVE ) ; TRANSPORT_ATTR . registerAttributes ( transport ) ; JGroupsExtension . createPropertyRegistration ( transport ) ; final ManagementResourceRegistration protocol = stacks . registerSubModel ( JGroupsExtension . protocolPath , JGroupsSubsystemProviders . PROTOCOL ) ; PROTOCOL_ATTR . registerAttributes ( protocol ) ; JGroupsExtension . createPropertyRegistration ( protocol ) ; } @ Override public void initializeParsers ( ExtensionParsingContext context ) { } static void createPropertyRegistration ( final ManagementResourceRegistration parent ) { } }

Fix:
final EnumSet < OperationEntry . Flag > readOnly = EnumSet . of ( READ_ONLY , RUNTIME_ONLY ) ;