[ 
https://issues.apache.org/jira/browse/SLING-7931?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Jason E Bailey resolved SLING-7931.
-----------------------------------
    Resolution: Fixed

fixed in commit e5cc4ffc98a8aca2ea3994cafdcf16ea1c505ffd

> SlingQuery - Last method doesn't work as expected
> -------------------------------------------------
>
>                 Key: SLING-7931
>                 URL: https://issues.apache.org/jira/browse/SLING-7931
>             Project: Sling
>          Issue Type: Bug
>          Components: Sling Query
>    Affects Versions: Sling Query 4.0.2
>         Environment: Java 8, AEM 6.4 SP1, Linux x64 Fedora
>            Reporter: Michele Scala
>            Assignee: Jason E Bailey
>            Priority: Critical
>              Labels: sling-query
>             Fix For: Sling Query 4.0.4
>
>         Attachments: sling-query-test-result.jpg, test-sling-query.groovy, 
> test-sling-query.infinity.json
>
>
> Last() method of the Sling Query doesn't return the correct value in case you 
> have filtered the resources before. I'll try to describe the problem with an 
> example.
> *Expected*
> [ 1 , 2 , 3 , 4 ] –> FILTER ([n=1]) = [ 1 ] –> LAST = [ 1 ]
> *Current behavior*
> [ 1 , 2 , 3 , 4 ] –> FILTER ([n=1]) = [ 1 ] –> LAST = NULL
> I think the problem is related to last iterator that doesn't check if the 
> next element is an empty option or a valid one.
> As attachment there is and an example that shows the bug.
>  
>  



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to