protected BindingResult<T> doConvert(Object value, ArgumentConversionContext<T> context) {
        Optional<T> result = conversionService.convert(value, context);
        if (result.isPresent() && context.getArgument().getType() == Optional.class) {
            return () -> (Optional<T>) result.get();
        }
        return () -> result;
    }
protected BindingResult < T > doConvert ( Object value , ArgumentConversionContext < T > context ) { Optional < T > result = conversionService . convert ( value , context ) ; if ( result . isPresent ( ) && context . getArgument ( ) . getType ( ) == Optional . class ) { return ( ) -> ( Optional < T > ) result . get ( ) ; } return ( ) -> result ; }
Convert the value and return a binding result.

@param value The value to convert
@param context The conversion context
@return The binding result