You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@jackrabbit.apache.org by "Alexander Klimetschek (JIRA)" <ji...@apache.org> on 2010/07/22 14:08:49 UTC

[jira] Created: (JCR-2684) Setting Query.setOffset() passed the results total returns negative getSize() instead of zero

Setting Query.setOffset() passed the results total returns negative getSize() instead of zero
---------------------------------------------------------------------------------------------

                 Key: JCR-2684
                 URL: https://issues.apache.org/jira/browse/JCR-2684
             Project: Jackrabbit Content Repository
          Issue Type: Bug
          Components: jackrabbit-core, query
    Affects Versions: 2.1.0
            Reporter: Alexander Klimetschek
            Priority: Minor
         Attachments: JCR-2684-testcase.patch

1. Have a query that returns 3 results
2. Now set Query.setOffset(10) (passed the total of 3)
3. Row/NodeIterator.getSize() returns -7 (incorrect)

Expected: getSize() should return 0

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


[jira] Updated: (JCR-2684) Setting Query.setOffset() passed the results total returns negative getSize() instead of zero

Posted by "Alexander Klimetschek (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/JCR-2684?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Alexander Klimetschek updated JCR-2684:
---------------------------------------

    Attachment: JCR-2684-fix.patch

Simple fix for the issue.

> Setting Query.setOffset() passed the results total returns negative getSize() instead of zero
> ---------------------------------------------------------------------------------------------
>
>                 Key: JCR-2684
>                 URL: https://issues.apache.org/jira/browse/JCR-2684
>             Project: Jackrabbit Content Repository
>          Issue Type: Bug
>          Components: jackrabbit-core, query
>    Affects Versions: 2.1.0
>            Reporter: Alexander Klimetschek
>            Priority: Minor
>         Attachments: JCR-2684-fix.patch, JCR-2684-testcase.patch
>
>
> 1. Have a query that returns 3 results
> 2. Now set Query.setOffset(10) (passed the total of 3)
> 3. Row/NodeIterator.getSize() returns -7 (incorrect)
> Expected: getSize() should return 0

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


[jira] Updated: (JCR-2684) Setting Query.setOffset() passed the results total returns negative getSize() instead of zero

Posted by "Alexander Klimetschek (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/JCR-2684?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Alexander Klimetschek updated JCR-2684:
---------------------------------------

    Attachment: JCR-2684-testcase.patch

A test case for the issue. Extends the existing LimitAndOffsetTest.

> Setting Query.setOffset() passed the results total returns negative getSize() instead of zero
> ---------------------------------------------------------------------------------------------
>
>                 Key: JCR-2684
>                 URL: https://issues.apache.org/jira/browse/JCR-2684
>             Project: Jackrabbit Content Repository
>          Issue Type: Bug
>          Components: jackrabbit-core, query
>    Affects Versions: 2.1.0
>            Reporter: Alexander Klimetschek
>            Priority: Minor
>         Attachments: JCR-2684-testcase.patch
>
>
> 1. Have a query that returns 3 results
> 2. Now set Query.setOffset(10) (passed the total of 3)
> 3. Row/NodeIterator.getSize() returns -7 (incorrect)
> Expected: getSize() should return 0

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


[jira] Updated: (JCR-2684) Setting Query.setOffset() passed the results total returns negative getSize() instead of zero

Posted by "Alexander Klimetschek (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/JCR-2684?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Alexander Klimetschek updated JCR-2684:
---------------------------------------

    Status: Patch Available  (was: Open)

> Setting Query.setOffset() passed the results total returns negative getSize() instead of zero
> ---------------------------------------------------------------------------------------------
>
>                 Key: JCR-2684
>                 URL: https://issues.apache.org/jira/browse/JCR-2684
>             Project: Jackrabbit Content Repository
>          Issue Type: Bug
>          Components: jackrabbit-core, query
>    Affects Versions: 2.1.0
>            Reporter: Alexander Klimetschek
>            Assignee: Alexander Klimetschek
>            Priority: Minor
>         Attachments: JCR-2684-fix.patch, JCR-2684-testcase.patch
>
>
> 1. Have a query that returns 3 results
> 2. Now set Query.setOffset(10) (passed the total of 3)
> 3. Row/NodeIterator.getSize() returns -7 (incorrect)
> Expected: getSize() should return 0

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


[jira] Updated: (JCR-2684) Setting Query.setOffset() passed the results total returns negative getSize() instead of zero

Posted by "Alexander Klimetschek (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/JCR-2684?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Alexander Klimetschek updated JCR-2684:
---------------------------------------

           Status: Resolved  (was: Patch Available)
    Fix Version/s: 2.2.0
       Resolution: Fixed

Added the fix and the unit test in revision 966624.

> Setting Query.setOffset() passed the results total returns negative getSize() instead of zero
> ---------------------------------------------------------------------------------------------
>
>                 Key: JCR-2684
>                 URL: https://issues.apache.org/jira/browse/JCR-2684
>             Project: Jackrabbit Content Repository
>          Issue Type: Bug
>          Components: jackrabbit-core, query
>    Affects Versions: 2.1.0
>            Reporter: Alexander Klimetschek
>            Assignee: Alexander Klimetschek
>            Priority: Minor
>             Fix For: 2.2.0
>
>         Attachments: JCR-2684-fix.patch, JCR-2684-testcase.patch
>
>
> 1. Have a query that returns 3 results
> 2. Now set Query.setOffset(10) (passed the total of 3)
> 3. Row/NodeIterator.getSize() returns -7 (incorrect)
> Expected: getSize() should return 0

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


[jira] Assigned: (JCR-2684) Setting Query.setOffset() passed the results total returns negative getSize() instead of zero

Posted by "Alexander Klimetschek (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/JCR-2684?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Alexander Klimetschek reassigned JCR-2684:
------------------------------------------

    Assignee: Alexander Klimetschek

> Setting Query.setOffset() passed the results total returns negative getSize() instead of zero
> ---------------------------------------------------------------------------------------------
>
>                 Key: JCR-2684
>                 URL: https://issues.apache.org/jira/browse/JCR-2684
>             Project: Jackrabbit Content Repository
>          Issue Type: Bug
>          Components: jackrabbit-core, query
>    Affects Versions: 2.1.0
>            Reporter: Alexander Klimetschek
>            Assignee: Alexander Klimetschek
>            Priority: Minor
>         Attachments: JCR-2684-fix.patch, JCR-2684-testcase.patch
>
>
> 1. Have a query that returns 3 results
> 2. Now set Query.setOffset(10) (passed the total of 3)
> 3. Row/NodeIterator.getSize() returns -7 (incorrect)
> Expected: getSize() should return 0

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