https://bz.apache.org/bugzilla/show_bug.cgi?id=65085

            Bug ID: 65085
           Summary: LineRect shall throw more specific exceptions
           Product: POI
           Version: unspecified
          Hardware: PC
            Status: NEW
          Severity: normal
          Priority: P2
         Component: HSLF
          Assignee: [email protected]
          Reporter: [email protected]
  Target Milestone: ---

LineRect#getRowHeight and LineRect#setRowHeight throw IllegalArgumentException:

 public double getRowHeight(int row) {
        if (row < 0 || row >= cells.length) {
            throw new IllegalArgumentException("Row index '"+row+"' is not
within range [0-"+(cells.length-1)+"]");
        }

        return cells[row][0].getAnchor().getHeight();
    }

    @Override
    public void setRowHeight(int row, final double height) {
        if (row < 0 || row >= cells.length) {
            throw new IllegalArgumentException("Row index '"+row+"' is not
within range [0-"+(cells.length-1)+"]");
        }
        ...
}

In both cases, it is more reasonable to throw IndexOutOfBoundsException.

-- 
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to