Added a null check for the optional converter (#2485)

This commit is contained in:
Tomescu Vlad-Costin 2023-08-05 22:02:41 +03:00 committed by GitHub
parent 98fbcc6585
commit e219103a25
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -168,6 +168,7 @@ public class Converters {
@Override
public Optional<T> getSpecific(Object generic) {
if (generic == null) return Optional.empty();
Optional<Object> optional = (Optional<Object>) generic;
return optional.map(converter::getSpecific);
}