Name: aaC67449 Date: 10/23/98
The JCK test api/javax_swing/JTable/AccessibleJTable/index.html#AccessibleSelection throws unexpected ArrayIndexOutOfBoundsException with JIT only.
The java is JDK1.2 FCS build O.
--------------- Example---------------------------
import javax.swing.*;
import javax.accessibility.*;
public class Test {
public static void main(String argv[]) {
Object test[][]={
{"Test11","Test12","Test13","Test14","Test15"},
{"Test21","Test22","Test23","Test24","Test25"},
{"Test31","Test32","Test33","Test34","Test35"},
{"Test41","Test42","Test43","Test44","Test45"},
{"Test51","Test52","Test53","Test54","Test55"},
};
Object columnName[]={"Test1","Test2","Test3","Test4","Test5"};
JTable o = new JTable(test,columnName);
AccessibleSelection c = o.getAccessibleContext().getAccessibleSelection();
o.setRowSelectionAllowed(true);
o.setColumnSelectionAllowed(true);
for(int i=0;i<5;i++) {
for(int j=i;j<5;j++) {
o.setRowSelectionInterval(i,j);
for(int k=0;k<c.getAccessibleSelectionCount();k++)
c.getAccessibleSelection(k);
}
}
System.out.println ("Finished");
}
}
----------------output------------------
Symantec Java! JustInTime Compiler Version 3.00.078(x) for JDK 1.2
Copyright (C) 1996-98 Symantec Corporation
java.lang.ArrayIndexOutOfBoundsException
at javax.swing.JTable$AccessibleJTable.getAccessibleSelection(Compiled C
ode)
at Test.main(Compiled Code)
^C
======================================================================