class DefaultEnumConverter implements AttributeConverter<E, String> {

    @Override
    public E convertToEntityAttribute(String attribute) {
        try {
            if (attribute == null) {
                return null;
            }
            return (E) Enum.valueOf(getDefault().getClass(), attribute);
        } catch (Exception e) {
            LOGGER.info("The {} value is not backward compatible: {}", getDefault().getClass().getSimpleName(), attribute);
        }
        Optional<E> convertedEnum = tryConvertUnknownField(attribute);
        return convertedEnum.orElse(getDefault());
    }

}