in src/main/java/org/apache/sling/models/impl/injectors/ResourcePathInjector.java [107:121]
private List<Resource> getResources(ResourceResolver resolver, String[] paths, String fieldName) {
List<Resource> resources = new ArrayList<>();
for (String path : paths) {
Resource resource = resolver.getResource(path);
if (resource != null) {
resources.add(resource);
} else {
LOG.warn("Could not retrieve resource at path {} for field {}. Since it is required it won't be injected.",
path, fieldName);
// all resources should've been injected. we stop
return null;
}
}
return resources;
}