Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-39391

Support for from index greater than the actual array size during pagination

    Details

    • Similar Issues:

      Description

      In range notation during pagination, if the from index exceeds the actual array size, Jenkins throws an exception. Can't it return an empty response or something similar instead, so that we know when to stop?

      For example, suppose a Jenkins server has 10840 jobs and we want to get all the jobs' details. We keep incrementing the lower bound according to page size (say 1000). Eventually, we hit:
      http://server/api/json?tree=jobs[name,url,builds[number,url]]

      {11000,12000}

      which throws the following exception:
      Caused by: java.lang.IllegalArgumentException: fromIndex(11000) > toIndex(10841)

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              pxk5958 Pratith Kanagaraj
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated: