https://defect.opensolaris.org/bz/show_bug.cgi?id=17936

           Summary: ArrayIndexOutOfBoundsException when using n=50 as URL
                    query parameter
    Classification: Development
           Product: opengrok
           Version: unspecified
          Platform: ANY/Generic
        OS/Version: All
            Status: NEW
          Severity: minor
          Priority: P3
         Component: webapp
        AssignedTo: [email protected]
        ReportedBy: [email protected]
                CC: [email protected]


When using n=50 as a query parameter the third page of results will throw an
ArrayIndexOutOfBoundsException.  For a live example, go to
http://src.opensolaris.org/source/s?n=50&start=0&q=String&sort=relevancy&project=opengrok,
and click on page 3.  This can also happen with other values of n, for instance
http://src.opensolaris.org/source/s?n=10&start=0&q=String&sort=relevancy&project=opengrok,
page 13.

I believe this happens because the code caches (cachePages * hitsPerPage) hits
which by default is (5 * 25) = 125.  When using n=50 (or n=10) the results run
out right in the middle of the page.

The above testcases used to produce more information indicating the that the
index was 125 and a stack trace blaming Results.java:70.  I believe the line in
question is
http://www.norbye.org/hg/opengrok/trunk/index.cgi/file/9b89f82c1910/src/org/opensolaris/opengrok/search/Results.java#l70
.
Right now this information is missing and only "null" is printed.  This may be
a separate bug.

-- 
Configure bugmail: https://defect.opensolaris.org/bz/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.
_______________________________________________
opengrok-dev mailing list
[email protected]
http://mail.opensolaris.org/mailman/listinfo/opengrok-dev

Reply via email to