private List<VespaConfigChangeAction> validateRemoveAttributeAspect() {
        return currentFields.attributes().stream().
                map(Attribute::getName).
                filter(attrName -> !nextFields.containsAttribute(attrName) &&
                                   nextDocType.containsField(attrName) &&
                                   !isIndexField(attrName)).
                map(attrName -> new VespaRestartAction(id, new ChangeMessageBuilder(attrName).addChange("remove attribute aspect").build())).
                collect(Collectors.toList());
    }
Validates the changes between the current and next set of attribute fields in a document database.

@author geirst
config-model/src/main/java/com/yahoo/vespa/model/application/validation/change/search/AttributeChangeValidator.java