Author: rwhitcomb Date: Mon Feb 1 13:25:17 2016 New Revision: 1727932 URL: http://svn.apache.org/viewvc?rev=1727932&view=rev Log: PIVOT-983: A similar bug was fixed in the VFS File Browser. The issue is that the "getRowAt" method of TableView returns -1 if the given y position is past the end of the data length. Trying to get row -1 from an ArrayList gives this IllegalArgumentException. The solution implemented in the previous fix was simply to check for the -1 row value and exit early in that case. So, port that fix to the regular File Browser.
This is a merge of revision 1727931 from trunk to branches/2.0.x. Modified: pivot/branches/2.0.x/ (props changed) pivot/branches/2.0.x/wtk-terra/src/org/apache/pivot/wtk/skin/terra/TerraFileBrowserSkin.java Propchange: pivot/branches/2.0.x/ ------------------------------------------------------------------------------ --- svn:mergeinfo (original) +++ svn:mergeinfo Mon Feb 1 13:25:17 2016 @@ -1 +1 @@ -/pivot/trunk:1346574,1347051,1394847,1394858,1398511,1399331,1401781,1405882,1407585,1409081,1410536,1410555,1417081,1417258,1428056,1428650,1435351,1436707,1438126,1438659,1444260,1444910,1502657,1510821,1516518,1519859,1522078,1523205,1523736,1523776,1525982,1526005,1536829,1537222,1604238,1610563,1611829,1614462,1624381,1675204,1675517,1678238,1678251,1687873-1687874,1688306,1688484,1688523,1691618,1712175,1717360 +/pivot/trunk:1346574,1347051,1394847,1394858,1398511,1399331,1401781,1405882,1407585,1409081,1410536,1410555,1417081,1417258,1428056,1428650,1435351,1436707,1438126,1438659,1444260,1444910,1502657,1510821,1516518,1519859,1522078,1523205,1523736,1523776,1525982,1526005,1536829,1537222,1604238,1610563,1611829,1614462,1624381,1675204,1675517,1678238,1678251,1687873-1687874,1688306,1688484,1688523,1691618,1712175,1717360,1727931 Modified: pivot/branches/2.0.x/wtk-terra/src/org/apache/pivot/wtk/skin/terra/TerraFileBrowserSkin.java URL: http://svn.apache.org/viewvc/pivot/branches/2.0.x/wtk-terra/src/org/apache/pivot/wtk/skin/terra/TerraFileBrowserSkin.java?rev=1727932&r1=1727931&r2=1727932&view=diff ============================================================================== --- pivot/branches/2.0.x/wtk-terra/src/org/apache/pivot/wtk/skin/terra/TerraFileBrowserSkin.java (original) +++ pivot/branches/2.0.x/wtk-terra/src/org/apache/pivot/wtk/skin/terra/TerraFileBrowserSkin.java Mon Feb 1 13:25:17 2016 @@ -919,7 +919,11 @@ public class TerraFileBrowserSkin extend } // Gets the underlying file - File file = (File) fileTableView.getTableData().get(fileTableView.getRowAt(y)); + int row = fileTableView.getRowAt(y); + if (row < 0) { + return; + } + File file = (File) fileTableView.getTableData().get(row); // Construct and show the tooltip. final Tooltip tooltip = new Tooltip();