public List<VespaConfigChangeAction> validate() {
        return currentDocType.getAllFields().stream().
                map(field -> createFieldChange(field, nextDocType)).
                filter(fieldChange -> fieldChange.valid() && fieldChange.changedType()).
                map(fieldChange -> VespaRefeedAction.of(id,
                                                        ValidationId.fieldTypeChange,
                                                        new ChangeMessageBuilder(fieldChange.fieldName()).
                                                                                 addChange("data type", fieldChange.currentTypeName(),
                                                                                 fieldChange.nextTypeName()).build()
                )).
                collect(Collectors.toList());
    }
Validates the changes between a current and next document type used in a document database.

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