Uploaded image for project: 'RichFaces'
  1. RichFaces
  2. RF-14197

page-fragments: dataGrid: getRecordsInRow contains bad condition

    Details

    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: Major
    • Resolution: Done
    • Affects Version/s: 4.5.10
    • Fix Version/s: 4.5.11
    • Component/s: None
    • Labels:
      None

      Description

      The method contains:

          public List<RECORD> getRecordsInRow(int rowIndex) {
              List<RECORD> result = new ArrayList<RECORD>();
              if (getNumberOfRows() - 1 > rowIndex) {// <<<
                  throw new IllegalArgumentException("There is not so many rows! Requesting: " + rowIndex + ", but there is only: " + getNumberOfRows());
              }
      

      The condition getNumberOfRows() - 1 > rowIndex should be reversed, because now it is throwing an IllegalArgumentException with every sane use-case.

        Gliffy Diagrams

          Attachments

            Activity

              People

              • Assignee:
                jstefek Jiří Štefek
                Reporter:
                jstefek Jiří Štefek
              • Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: