You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pivot.apache.org by tv...@apache.org on 2009/10/15 19:01:44 UTC

svn commit: r825563 - /incubator/pivot/trunk/wtk/src/org/apache/pivot/wtk/skin/TablePaneSkin.java

Author: tvolkert
Date: Thu Oct 15 17:01:44 2009
New Revision: 825563

URL: http://svn.apache.org/viewvc?rev=825563&view=rev
Log:
Added bounds checking on some TablePaneSkin methods

Modified:
    incubator/pivot/trunk/wtk/src/org/apache/pivot/wtk/skin/TablePaneSkin.java

Modified: incubator/pivot/trunk/wtk/src/org/apache/pivot/wtk/skin/TablePaneSkin.java
URL: http://svn.apache.org/viewvc/incubator/pivot/trunk/wtk/src/org/apache/pivot/wtk/skin/TablePaneSkin.java?rev=825563&r1=825562&r2=825563&view=diff
==============================================================================
--- incubator/pivot/trunk/wtk/src/org/apache/pivot/wtk/skin/TablePaneSkin.java (original)
+++ incubator/pivot/trunk/wtk/src/org/apache/pivot/wtk/skin/TablePaneSkin.java Thu Oct 15 17:01:44 2009
@@ -1482,6 +1482,11 @@
             return new Bounds(0, 0, 0, 0);
         }
 
+        if (row < 0
+            || row >= rowHeights.length) {
+            throw new IndexOutOfBoundsException(String.valueOf(row));
+        }
+
         int rowY = padding.top;
 
         for (int i = 0; i < row; i++) {
@@ -1519,6 +1524,11 @@
             return new Bounds(0, 0, 0, 0);
         }
 
+        if (column < 0
+            || column >= columnWidths.length) {
+            throw new IndexOutOfBoundsException(String.valueOf(column));
+        }
+
         int columnX = padding.left;
 
         for (int j = 0; j < column; j++) {