Buggy code:
class JSFSubsystemTransformers { private static final String JSF_SUBSYSTEM = "jsf" ; private static final String SLOT_ATTRIBUTE_NAME = "default-jsf-impl-slot" ; private static final String SLOT_DEFAULT_VALUE = "main" ; static void registerTransformers120 ( TransformerRegistry registry , TransformersSubRegistration parent ) { registry . registerSubsystemTransformers ( JSFSubsystemTransformers . JSF_SUBSYSTEM , DomainTransformers . IGNORED_SUBSYSTEMS , new ResourceTransformer ( ) { @ Override public void transformResource ( ResourceTransformationContext context , PathAddress address , Resource resource ) throws OperationFailedException { ModelNode model = resource . getModel ( ) ; if ( model . hasDefined ( JSFSubsystemTransformers . SLOT_ATTRIBUTE_NAME ) ) { ModelNode slot = model . get ( JSFSubsystemTransformers . SLOT_ATTRIBUTE_NAME ) ; if ( ! ( JSFSubsystemTransformers . SLOT_DEFAULT_VALUE . equals ( slot . asString ( ) ) ) ) { <START_BUG> context . getLogger ( ) . logAttributeWarning ( address , JSFSubsystemTransformers . SLOT_ATTRIBUTE_NAME , DomainControllerMessages . MESSAGES . invalidJSFSlotValue ( slot . asString ( ) ) ) ; <END_BUG> } } Set < String > attributes = new HashSet < String > ( ) ; for ( Property prop : resource . getModel ( ) . asPropertyList ( ) ) { attributes . add ( prop . getName ( ) ) ; } attributes . remove ( JSFSubsystemTransformers . SLOT_ATTRIBUTE_NAME ) ; if ( ! ( attributes . isEmpty ( ) ) ) { context . getLogger ( ) . logAttributeWarning ( address , MESSAGES . attributesAreNotUnderstoodAndMustBeIgnored ( ) , attributes ) ; } } } ) ; TransformersSubRegistration jsfSubsystem = parent . registerSubResource ( PathElement . pathElement ( SUBSYSTEM , JSFSubsystemTransformers . JSF_SUBSYSTEM ) ) ; jsfSubsystem . registerOperationTransformer ( ADD , new OperationTransformer ( ) { @ Override public TransformedOperation transformOperation ( TransformationContext context , PathAddress address , ModelNode operation ) throws OperationFailedException { if ( operation . hasDefined ( JSFSubsystemTransformers . SLOT_ATTRIBUTE_NAME ) ) { ModelNode slot = operation . get ( JSFSubsystemTransformers . SLOT_ATTRIBUTE_NAME ) ; if ( ! ( JSFSubsystemTransformers . SLOT_DEFAULT_VALUE . equals ( slot . asString ( ) ) ) ) { return new TransformedOperation ( operation , new JSFSubsystemTransformers . RejectionWithFailurePolicy ( DomainControllerMessages . MESSAGES . invalidJSFSlotValue ( slot . asString ( ) ) ) , OperationResultTransformer . ORIGINAL_RESULT ) ; } } Set < String > attributes = new HashSet < String > ( ) ; for ( Property prop : operation . asPropertyList ( ) ) { attributes . add ( prop . getName ( ) ) ; } attributes . remove ( JSFSubsystemTransformers . SLOT_ATTRIBUTE_NAME ) ; if ( ! ( attributes . isEmpty ( ) ) ) { return new TransformedOperation ( operation , new JSFSubsystemTransformers . RejectionWithFailurePolicy ( DomainControllerMessages . MESSAGES . unknownAttributesFromSubsystemVersion ( ADD , JSFSubsystemTransformers . JSF_SUBSYSTEM , context . getTarget ( ) . getSubsystemVersion ( JSFSubsystemTransformers . JSF_SUBSYSTEM ) , attributes ) ) , OperationResultTransformer . ORIGINAL_RESULT ) ; } return DISCARD . transformOperation ( context , address , operation ) ; } } ) ; jsfSubsystem . registerOperationTransformer ( WRITE_ATTRIBUTE_OPERATION , new OperationTransformer ( ) { @ Override public TransformedOperation transformOperation ( TransformationContext context , PathAddress address , ModelNode operation ) throws OperationFailedException { final String name = operation . require ( NAME ) . asString ( ) ; final ModelNode value = operation . get ( VALUE ) ; if ( JSFSubsystemTransformers . SLOT_ATTRIBUTE_NAME . equals ( name ) ) { if ( ( value . isDefined ( ) ) && ( value . equals ( JSFSubsystemTransformers . SLOT_DEFAULT_VALUE ) ) ) { return DISCARD . transformOperation ( context , address , operation ) ; } else { return new TransformedOperation ( operation , new JSFSubsystemTransformers . RejectionWithFailurePolicy ( DomainControllerMessages . MESSAGES . invalidJSFSlotValue ( value . asString ( ) ) ) , OperationResultTransformer . ORIGINAL_RESULT ) ; } } return new TransformedOperation ( operation , new JSFSubsystemTransformers . RejectionWithFailurePolicy ( DomainControllerMessages . MESSAGES . unknownAttributesFromSubsystemVersion ( ADD , JSFSubsystemTransformers . JSF_SUBSYSTEM , context . getTarget ( ) . getSubsystemVersion ( JSFSubsystemTransformers . JSF_SUBSYSTEM ) , Arrays . asList ( name ) ) ) , OperationResultTransformer . ORIGINAL_RESULT ) ; } } ) ; jsfSubsystem . registerOperationTransformer ( UNDEFINE_ATTRIBUTE_OPERATION , new OperationTransformer ( ) { @ Override public TransformedOperation transformOperation ( TransformationContext context , PathAddress address , ModelNode operation ) throws OperationFailedException { String attributeName = operation . require ( NAME ) . asString ( ) ; if ( ! ( JSFSubsystemTransformers . SLOT_ATTRIBUTE_NAME . equals ( attributeName ) ) ) { return DEFAULT . transformOperation ( context , address , operation ) ; } else { context . getLogger ( ) . logAttributeWarning ( address , MESSAGES . attributesAreNotUnderstoodAndMustBeIgnored ( ) , attributeName ) ; return DISCARD . transformOperation ( context , address , operation ) ; } } } ) ; } private static class RejectionWithFailurePolicy implements OperationRejectionPolicy { private final String failureDescription ; public RejectionWithFailurePolicy ( String failureDescription ) { } @ Override public boolean rejectOperation ( ModelNode preparedResult ) { } @ Override public String getFailureDescription ( ) { } } }

Fix:
context . getLogger ( ) . logAttributeWarning ( address , DomainControllerMessages . MESSAGES . invalidJSFSlotValue ( slot . asString ( ) ) , JSFSubsystemTransformers . SLOT_ATTRIBUTE_NAME ) ;