Buggy code:
public abstract class AbstractQueueControlHandler < T > extends AbstractRuntimeOnlyHandler { public static final String LIST_MESSAGES = "list-messages" ; public static final String LIST_MESSAGES_AS_JSON = "list-messages-as-json" ; public static final String COUNT_MESSAGES = "count-messages" ; public static final String REMOVE_MESSAGE = "remove-message" ; public static final String REMOVE_MESSAGES = "remove-messages" ; public static final String EXPIRE_MESSAGES = "expire-messages" ; public static final String EXPIRE_MESSAGE = "expire-message" ; public static final String SEND_MESSAGE_TO_DEAD_LETTER_ADDRESS = "send-message-to-dead-letter-address" ; public static final String SEND_MESSAGES_TO_DEAD_LETTER_ADDRESS = "send-messages-to-dead-letter-address" ; public static final String CHANGE_MESSAGE_PRIORITY = "change-message-priority" ; public static final String CHANGE_MESSAGES_PRIORITY = "change-messages-priority" ; public static final String MOVE_MESSAGE = "move-message" ; public static final String MOVE_MESSAGES = "move-messages" ; public static final String LIST_MESSAGE_COUNTER = "list-message-counter" ; public static final String LIST_MESSAGE_COUNTER_AS_JSON = "list-message-counter-as-json" ; public static final String LIST_MESSAGE_COUNTER_AS_HTML = "list-message-counter-as-html" ; public static final String RESET_MESSAGE_COUNTER = "reset-message-counter" ; public static final String LIST_MESSAGE_COUNTER_HISTORY = "list-message-counter-history" ; public static final String LIST_MESSAGE_COUNTER_HISTORY_AS_JSON = "list-message-counter-history-as-json" ; public static final String LIST_MESSAGE_COUNTER_HISTORY_AS_HTML = "list-message-counter-history-as-html" ; public static final String PAUSE = "pause" ; public static final String RESUME = "resume" ; public static final String LIST_CONSUMERS = "list-consumers" ; public static final String LIST_CONSUMERS_AS_JSON = "list-consumers-as-json" ; public static final String MESSAGE_ID = "message-id" ; public static final String NEW_PRIORITY = "new-priority" ; public static final String OTHER_QUEUE_NAME = "other-queue-name" ; public static final String REJECT_DUPLICATES = "reject-duplicates" ; private final ParametersValidator singleOptionalFilterValidator = new ParametersValidator ( ) ; private final ParametersValidator singleMessageIdValidator = new ParametersValidator ( ) ; private final ParametersValidator changeMessagePriorityValidator = new ParametersValidator ( ) ; private final ParametersValidator changeMessagesPriorityValidator = new ParametersValidator ( ) ; private final ParametersValidator moveMessageValidator = new ParametersValidator ( ) ; private final ParametersValidator moveMessagesValidator = new ParametersValidator ( ) ; protected AbstractQueueControlHandler ( final ParameterValidator messageIdValidator ) { } public void registerOperations ( final ManagementResourceRegistration registry ) { final boolean forJMS = isJMS ( ) ; <START_BUG> final EnumSet < OperationEntry . Flag > readOnly = EnumSet . of ( READ_ONLY ) ; <END_BUG> registry . registerOperationHandler ( AbstractQueueControlHandler . LIST_MESSAGES , this , new DescriptionProvider ( ) { @ Override public ModelNode getModelDescription ( Locale locale ) { return MessagingDescriptions . getListMessages ( locale , forJMS , false ) ; } } , false , PUBLIC , readOnly ) ; registry . registerOperationHandler ( AbstractQueueControlHandler . LIST_MESSAGES_AS_JSON , this , new DescriptionProvider ( ) { @ Override public ModelNode getModelDescription ( Locale locale ) { return MessagingDescriptions . getListMessages ( locale , forJMS , true ) ; } } , readOnly ) ; registry . registerOperationHandler ( AbstractQueueControlHandler . COUNT_MESSAGES , this , new DescriptionProvider ( ) { @ Override public ModelNode getModelDescription ( Locale locale ) { return MessagingDescriptions . getCountMessages ( locale ) ; } } , readOnly ) ; registry . registerOperationHandler ( AbstractQueueControlHandler . REMOVE_MESSAGE , this , new DescriptionProvider ( ) { @ Override public ModelNode getModelDescription ( Locale locale ) { return MessagingDescriptions . getRemoveMessage ( locale , forJMS ) ; } } ) ; registry . registerOperationHandler ( AbstractQueueControlHandler . REMOVE_MESSAGES , this , new DescriptionProvider ( ) { @ Override public ModelNode getModelDescription ( Locale locale ) { return MessagingDescriptions . getRemoveMessages ( locale ) ; } } ) ; registry . registerOperationHandler ( AbstractQueueControlHandler . EXPIRE_MESSAGES , this , new DescriptionProvider ( ) { @ Override public ModelNode getModelDescription ( Locale locale ) { return MessagingDescriptions . getExpireMessages ( locale ) ; } } ) ; registry . registerOperationHandler ( AbstractQueueControlHandler . EXPIRE_MESSAGE , this , new DescriptionProvider ( ) { @ Override public ModelNode getModelDescription ( Locale locale ) { return MessagingDescriptions . getExpireMessage ( locale , forJMS ) ; } } ) ; registry . registerOperationHandler ( AbstractQueueControlHandler . SEND_MESSAGE_TO_DEAD_LETTER_ADDRESS , this , new DescriptionProvider ( ) { @ Override public ModelNode getModelDescription ( Locale locale ) { return MessagingDescriptions . getSendMessageToDeadLetterAddress ( locale , forJMS ) ; } } ) ; registry . registerOperationHandler ( AbstractQueueControlHandler . SEND_MESSAGES_TO_DEAD_LETTER_ADDRESS , this , new DescriptionProvider ( ) { @ Override public ModelNode getModelDescription ( Locale locale ) { return MessagingDescriptions . getSendMessagesToDeadLetterAddress ( locale ) ; } } ) ; registry . registerOperationHandler ( AbstractQueueControlHandler . CHANGE_MESSAGE_PRIORITY , this , new DescriptionProvider ( ) { @ Override public ModelNode getModelDescription ( Locale locale ) { return MessagingDescriptions . getChangeMessagePriority ( locale , forJMS ) ; } } ) ; registry . registerOperationHandler ( AbstractQueueControlHandler . CHANGE_MESSAGES_PRIORITY , this , new DescriptionProvider ( ) { @ Override public ModelNode getModelDescription ( Locale locale ) { return MessagingDescriptions . getChangeMessagesPriority ( locale ) ; } } ) ; registry . registerOperationHandler ( AbstractQueueControlHandler . MOVE_MESSAGE , this , new DescriptionProvider ( ) { @ Override public ModelNode getModelDescription ( Locale locale ) { return MessagingDescriptions . getMoveMessage ( locale , forJMS ) ; } } ) ; registry . registerOperationHandler ( AbstractQueueControlHandler . MOVE_MESSAGES , this , new DescriptionProvider ( ) { @ Override public ModelNode getModelDescription ( Locale locale ) { return MessagingDescriptions . getMoveMessages ( locale ) ; } } ) ; registry . registerOperationHandler ( AbstractQueueControlHandler . LIST_MESSAGE_COUNTER_AS_JSON , this , new DescriptionProvider ( ) { @ Override public ModelNode getModelDescription ( Locale locale ) { return MessagingDescriptions . getNoArgSimpleReplyOperation ( locale , AbstractQueueControlHandler . LIST_MESSAGE_COUNTER_AS_JSON , "queue" , STRING , true ) ; } } , readOnly ) ; registry . registerOperationHandler ( AbstractQueueControlHandler . LIST_MESSAGE_COUNTER_AS_HTML , this , new DescriptionProvider ( ) { @ Override public ModelNode getModelDescription ( Locale locale ) { return MessagingDescriptions . getNoArgSimpleReplyOperation ( locale , AbstractQueueControlHandler . LIST_MESSAGE_COUNTER_AS_HTML , "queue" , STRING , true ) ; } } , readOnly ) ; registry . registerOperationHandler ( AbstractQueueControlHandler . RESET_MESSAGE_COUNTER , this , new DescriptionProvider ( ) { @ Override public ModelNode getModelDescription ( Locale locale ) { return MessagingDescriptions . getDescriptionOnlyOperation ( locale , AbstractQueueControlHandler . RESET_MESSAGE_COUNTER , "queue" ) ; } } ) ;

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