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

[jira] Created: (JCR-547) SimpleSelectionTest assumes RowIterator.getSize() not to return -1

SimpleSelectionTest assumes RowIterator.getSize() not to return -1
------------------------------------------------------------------

                 Key: JCR-547
                 URL: http://issues.apache.org/jira/browse/JCR-547
             Project: Jackrabbit
          Issue Type: Bug
          Components: JCR TCK
            Reporter: Julian Reschke
            Priority: Minor


Test case "testSingleProperty" assumes that RowIterator.getSize() will not return -1. This is an incorrect assumption, according to the JavaDoc for RangeIterator.

Suggested change:

        long size = result.getRows().getSize();
        if (size != -1) {
            assertEquals("Should have only 1 result", 1, size);
        }


-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Resolved: (JCR-547) SimpleSelectionTest assumes RowIterator.getSize() not to return -1

Posted by "Marcel Reutegger (JIRA)" <ji...@apache.org>.
     [ http://issues.apache.org/jira/browse/JCR-547?page=all ]

Marcel Reutegger resolved JCR-547.
----------------------------------

    Fix Version/s: 1.1
       Resolution: Fixed

I've fixed it the following way:

-        assertEquals("Should have only 1 result", 1, result.getRows().getSize());
+        assertEquals("Should have only 1 result", 1, getSize(result.getRows()));


Which has the same effect as your suggestion.

svn revision: 433644

Thank you for reporting this issue.

> SimpleSelectionTest assumes RowIterator.getSize() not to return -1
> ------------------------------------------------------------------
>
>                 Key: JCR-547
>                 URL: http://issues.apache.org/jira/browse/JCR-547
>             Project: Jackrabbit
>          Issue Type: Bug
>          Components: JCR TCK
>            Reporter: Julian Reschke
>            Priority: Minor
>             Fix For: 1.1
>
>
> Test case "testSingleProperty" assumes that RowIterator.getSize() will not return -1. This is an incorrect assumption, according to the JavaDoc for RangeIterator.
> Suggested change:
>         long size = result.getRows().getSize();
>         if (size != -1) {
>             assertEquals("Should have only 1 result", 1, size);
>         }

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira