[ 
https://issues.apache.org/jira/browse/SLING-697?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12640442#action_12640442
 ] 

Carsten Ziegeler commented on SLING-697:
----------------------------------------

I guess the idea here is that the Resource#adaptTo(MyPojo.class) is invoked on 
each Resource, right?

What happens if a resource is not adaptable? Is it ignored or an exception 
thrown?

What do you think of adding a method to the ResourceUtil instead? Like

public static void Iterator<MyPojo> adaptResource(Iterator<Resource>, 
MyPojo.class);

> enhance ResourceResolver#findResources() signature to support typing
> --------------------------------------------------------------------
>
>                 Key: SLING-697
>                 URL: https://issues.apache.org/jira/browse/SLING-697
>             Project: Sling
>          Issue Type: Improvement
>          Components: API
>            Reporter: Dominique Jäggi
>            Priority: Minor
>
> it would be nice to be able to receive a typed iterator when using 
> ResourceResolver#findResources():
>  final Iterator<MyPojo> iterator = resourceResolver.findResources(statement, 
> Query.XPATH, MyPojo.class);

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to