Source:
public void execute(OperationContext context, ModelNode operation) throws OperationFailedException { final Resource resource = loadResource(context); if (resource == null || resource.isRuntime()) { return; } final ModelNode model = resource.getModel(); final ImmutableManagementResourceRegistration resourceRegistration = context.getResourceRegistration(); final Set<String> attributeNames = resourceRegistration.getAttributeNames(PathAddress.EMPTY_ADDRESS); for (final String attributeName : attributeNames) { final boolean has = model.hasDefined(attributeName); final AttributeAccess access = context.getResourceRegistration().getAttributeAccess(PathAddress.EMPTY_ADDRESS, attributeName); if (access.getStorageType() != AttributeAccess.Storage.CONFIGURATION){ continue; } final AttributeDefinition attr = access.getAttributeDefinition(); if (!has && isRequired(attr, model)) { attemptReadMissingAttributeValueFromHandler(context, access, attributeName, new ErrorHandler() { @Override public void throwError() throws OperationFailedException { throw new OperationFailedException(ControllerLogger.ROOT_LOGGER.required(attributeName)); }}); } if (!has) { continue; } if (attr.getRequires() != null) { for (final String required : attr.getRequires()) { if (!model.hasDefined(required)) { attemptReadMissingAttributeValueFromHandler(context, access, attributeName, new ErrorHandler() { @Override public void throwError() throws OperationFailedException { throw ControllerLogger.ROOT_LOGGER.requiredAttributeNotSet(required, attr.getName()); }}); } } } if (!isAllowed(attr, model)) { String[] alts = attr.getAlternatives(); StringBuilder sb = null; if (alts != null) { for (String alt : alts) { if (model.hasDefined(alt)) { if (sb == null) { sb = new StringBuilder(); } else { sb.append(", "); } sb.append(alt); } } } throw new OperationFailedException(ControllerLogger.ROOT_LOGGER.invalidAttributeCombo(attributeName, sb)); } } context.completeStep(OperationContext.RollbackHandler.NOOP_ROLLBACK_HANDLER); }

Target:
public void execute(OperationContext context, ModelNode operation) throws OperationFailedException { final Resource resource = loadResource(context); if (resource == null) { return; } final ModelNode model = resource.getModel(); final ImmutableManagementResourceRegistration resourceRegistration = context.getResourceRegistration(); final Set<String> attributeNames = resourceRegistration.getAttributeNames(PathAddress.EMPTY_ADDRESS); for (final String attributeName : attributeNames) { final boolean has = model.hasDefined(attributeName); final AttributeAccess access = context.getResourceRegistration().getAttributeAccess(PathAddress.EMPTY_ADDRESS, attributeName); if (access.getStorageType() != AttributeAccess.Storage.CONFIGURATION){ continue; } final AttributeDefinition attr = access.getAttributeDefinition(); if (!has && isRequired(attr, model)) { attemptReadMissingAttributeValueFromHandler(context, access, attributeName, new ErrorHandler() { @Override public void throwError() throws OperationFailedException { throw new OperationFailedException(ControllerLogger.ROOT_LOGGER.required(attributeName)); }}); } if (!has) { continue; } if (attr.getRequires() != null) { for (final String required : attr.getRequires()) { if (!model.hasDefined(required)) { attemptReadMissingAttributeValueFromHandler(context, access, attributeName, new ErrorHandler() { @Override public void throwError() throws OperationFailedException { throw ControllerLogger.ROOT_LOGGER.requiredAttributeNotSet(required, attr.getName()); }}); } } } if (!isAllowed(attr, model)) { String[] alts = attr.getAlternatives(); StringBuilder sb = null; if (alts != null) { for (String alt : alts) { if (model.hasDefined(alt)) { if (sb == null) { sb = new StringBuilder(); } else { sb.append(", "); } sb.append(alt); } } } throw new OperationFailedException(ControllerLogger.ROOT_LOGGER.invalidAttributeCombo(attributeName, sb)); } } context.completeStep(OperationContext.RollbackHandler.NOOP_ROLLBACK_HANDLER); }