in src/main/java/org/apache/sling/resource/collection/impl/ResourceCollectionAdapterFactory.java [72:83]
private <AdapterType> AdapterType getAdapter(Resource resource, Class<AdapterType> type) {
if (resource != null) {
if (type == COLLECTION_CLASS) {
if (resource.isResourceType(ResourceCollection.RESOURCE_TYPE)) {
return (AdapterType) new ResourceCollectionImpl(resource);
}
}
log.debug("Unable to adapt resource of {} to type {}", resource.getResourceType(), type.getName());
}
log.debug("Unable to adapt null resource to type {}", type.getName());
return null;
}