You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@poi.apache.org by bu...@apache.org on 2021/01/16 07:40:59 UTC

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

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: dev@poi.apache.org
          Reporter: zhonghao@pku.org.cn
  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: dev-unsubscribe@poi.apache.org
For additional commands, e-mail: dev-help@poi.apache.org


[Bug 65085] LineRect shall throw more specific exceptions

Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=65085

Andreas Beeker <ki...@apache.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|---                         |FIXED

--- Comment #1 from Andreas Beeker <ki...@apache.org> ---
Thank you for the info - fixed via r1889428

-- 
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@poi.apache.org
For additional commands, e-mail: dev-help@poi.apache.org


[Bug 65085] LineRect shall throw more specific exceptions

Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=65085

Dominik Stadler <do...@gmx.at> 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: dev-unsubscribe@poi.apache.org
For additional commands, e-mail: dev-help@poi.apache.org