]> source.dussan.org Git - poi.git/commitdiff
#65085 - LineRect shall throw more specific exceptions
authorAndreas Beeker <kiwiwings@apache.org>
Sun, 2 May 2021 22:03:02 +0000 (22:03 +0000)
committerAndreas Beeker <kiwiwings@apache.org>
Sun, 2 May 2021 22:03:02 +0000 (22:03 +0000)
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1889428 13f79535-47bb-0310-9956-ffa450edef68

poi-scratchpad/src/main/java/org/apache/poi/hslf/usermodel/HSLFTable.java

index 98eba71017fe33a2754cd35fe622eb6a12dead38..c95d24183673eed320319ec1fb1358a2548f6c18 100644 (file)
@@ -352,7 +352,7 @@ implements HSLFShapeContainer, TableShape<HSLFShape,HSLFTextParagraph> {
     @Override
     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)+"]");
+            throw new IndexOutOfBoundsException("Row index '"+row+"' is not within range [0-"+(cells.length-1)+"]");
         }
 
         return cells[row][0].getAnchor().getHeight();
@@ -361,7 +361,7 @@ implements HSLFShapeContainer, TableShape<HSLFShape,HSLFTextParagraph> {
     @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)+"]");
+            throw new IndexOutOfBoundsException("Row index '"+row+"' is not within range [0-"+(cells.length-1)+"]");
         }
 
         // update row height in the table properties