[jOOQ/jOOQ#18940] Fix NPE
This commit is contained in:
parent
14a4f1e84a
commit
c2bb7ffde0
@ -1652,6 +1652,14 @@ final class Tools {
|
||||
return configuration(scope != null ? scope.configuration() : null);
|
||||
}
|
||||
|
||||
/**
|
||||
* Allows <code>null</code> arguments, unlike
|
||||
* {@link ContextConverter#scoped(Converter)}.
|
||||
*/
|
||||
static final <T, U> ContextConverter<T, U> scoped(Converter<T, U> converter) {
|
||||
return converter != null ? ContextConverter.scoped(converter) : null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get a converter from a {@link ConverterProvider} or <code>null</code> if
|
||||
* no converter could be provided.
|
||||
@ -1669,7 +1677,7 @@ final class Tools {
|
||||
if (result == null && tType == Converters.UnknownType.class)
|
||||
result = converter(configuration, instance, (Class<T>) (instance == null ? Object.class : instance.getClass()), uType);
|
||||
|
||||
return result == null ? null : scoped(result);
|
||||
return scoped(result);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Loading…
Reference in New Issue
Block a user