Buggy code:
public class EeExtension implements Extension { public static final String SUBSYSTEM_NAME = "ee" ; private static final String RESOURCE_NAME = ( EeExtension . class . getPackage ( ) . getName ( ) ) + ".LocalDescriptions" ; private static final int MANAGEMENT_API_MAJOR_VERSION = 2 ; private static final int MANAGEMENT_API_MINOR_VERSION = 0 ; private static final int MANAGEMENT_API_MICRO_VERSION = 0 ; protected static final PathElement PATH_SUBSYSTEM = PathElement . pathElement ( SUBSYSTEM , EeExtension . SUBSYSTEM_NAME ) ; static ResourceDescriptionResolver getResourceDescriptionResolver ( final String keyPrefix ) { } @ Override public void initialize ( ExtensionContext context ) { } @ Override public void initializeParsers ( ExtensionParsingContext context ) { } private void registerTransformers ( SubsystemRegistration subsystem ) { ResourceTransformationDescriptionBuilder builder = Factory . createSubsystemInstance ( ) ; EeExtension . GlobalModulesRejecterConverter globalModulesRejecterConverter = new EeExtension . GlobalModulesRejecterConverter ( ) ; <START_BUG> builder . getAttributeBuilder ( ) . addRejectCheck ( new EeExtension . JBossDescriptorPropertyReplacementRejectChecker ( ) , JBOSS_DESCRIPTOR_PROPERTY_REPLACEMENT ) . addRejectCheck ( globalModulesRejecterConverter , INSTANCE ) . setValueConverter ( globalModulesRejecterConverter , INSTANCE ) . setDiscard ( new org . jboss . as . controller . transform . description . DiscardAttributeChecker . DiscardAttributeValueChecker ( false , false , new ModelNode ( false ) ) , ANNOTATION_PROPERTY_REPLACEMENT ) . addRejectCheck ( DEFINED , ANNOTATION_PROPERTY_REPLACEMENT ) ; <END_BUG> builder . rejectChildResource ( PathElement . pathElement ( CONTEXT_SERVICE ) ) ; builder . rejectChildResource ( PathElement . pathElement ( MANAGED_THREAD_FACTORY ) ) ; builder . rejectChildResource ( PathElement . pathElement ( MANAGED_EXECUTOR_SERVICE ) ) ; builder . rejectChildResource ( PathElement . pathElement ( MANAGED_SCHEDULED_EXECUTOR_SERVICE ) ) ; builder . discardChildResource ( DEFAULT_BINDINGS_PATH ) ; Tools . register ( builder . build ( ) , subsystem , ModelVersion . create ( 1 , 0 , 0 ) ) ; } private static class JBossDescriptorPropertyReplacementRejectChecker extends RejectAttributeChecker . DefaultRejectAttributeChecker { @ Override public String getRejectionLogMessage ( Map < String , ModelNode > attributes ) { } @ Override protected boolean rejectAttribute ( PathAddress address , String attributeName , ModelNode attributeValue , TransformationContext context ) { } } private static class GlobalModulesRejecterConverter extends RejectAttributeChecker . DefaultRejectAttributeChecker implements AttributeConverter { private final Pattern EXPRESSION_PATTERN = Pattern . compile ( ".*\\$\\{.*\\}.*" ) ; @ Override public void convertOperationParameter ( PathAddress address , String attributeName , ModelNode attributeValue , ModelNode operation , TransformationContext context ) { } @ Override public void convertResourceAttribute ( PathAddress address , String attributeName , ModelNode attributeValue , TransformationContext context ) { } @ Override protected boolean rejectAttribute ( PathAddress address , String attributeName , ModelNode attributeValue , TransformationContext context ) { } @ Override public String getRejectionLogMessage ( Map < String , ModelNode > attributes ) { } private void cleanModel ( final ModelNode attributeValue ) { } } }

Fix:
builder . getAttributeBuilder ( ) . addRejectCheck ( new EeExtension . JBossDescriptorPropertyReplacementRejectChecker ( ) , JBOSS_DESCRIPTOR_PROPERTY_REPLACEMENT ) . addRejectCheck ( globalModulesRejecterConverter , INSTANCE ) . setValueConverter ( globalModulesRejecterConverter , INSTANCE ) . setDiscard ( new org . jboss . as . controller . transform . description . DiscardAttributeChecker . DiscardAttributeValueChecker ( new ModelNode ( false ) ) , ANNOTATION_PROPERTY_REPLACEMENT ) . addRejectCheck ( DEFINED , ANNOTATION_PROPERTY_REPLACEMENT ) ;