diff --git a/src/main/java/it/fulminazzo/yamlparser/configuration/IConfiguration.java b/src/main/java/it/fulminazzo/yamlparser/configuration/IConfiguration.java index 6d52211..1c5c49d 100644 --- a/src/main/java/it/fulminazzo/yamlparser/configuration/IConfiguration.java +++ b/src/main/java/it/fulminazzo/yamlparser/configuration/IConfiguration.java @@ -830,8 +830,7 @@ default boolean isList(@NotNull String path) { List list = getObjectList(path); if (list == null) return null; return list.stream() - .filter(Objects::nonNull) - .map(o -> clazz.isAssignableFrom(o.getClass()) ? clazz.cast(o) : + .map(o -> o == null ? null : clazz.isAssignableFrom(o.getClass()) ? clazz.cast(o) : convertObjectToYAMLObject(path, o, clazz)) .filter(o -> check(path, o, clazz)) .collect(Collectors.toList());