sling-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jason E Bailey (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (SLING-7931) SlingQuery - Last method doesn't work as expected
Date Mon, 24 Sep 2018 17:41:00 GMT

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

Jason E Bailey commented on SLING-7931:
---------------------------------------

Thanks for the bug report! I'll get the fix for this in it's next release.

> 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
>            Priority: Critical
>              Labels: sling-query
>         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)

Mime
View raw message