[Bug 65085] New: LineRect shall throw more specific exceptions

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

[Bug 65085] New: LineRect shall throw more specific exceptions

Bugzilla from bugzilla@apache.org
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: [hidden email]
          Reporter: [hidden email]
  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: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

[Bug 65085] LineRect shall throw more specific exceptions

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

Dominik Stadler <[hidden email]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 OS|                            |All
           Severity|normal                      |enhancement

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