Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-4256659

AccessibleAWTList.clearAccessibleSelection() throws ArrayIndexOutOfBoundsExcepti

XMLWordPrintable

    • b26
    • generic, sparc
    • generic, solaris_2.5.1
    • Verified



      Name: aaC67449 Date: 07/23/99



      The List.AccessibleAWTList.clearAccessibleSelection() method throws unexpected
      ArrayIndexOutOfBoundsException.

      See example.
      ------------- example --------------
      import java.awt.List;
      import javax.accessibility.AccessibleSelection;

      public class Test {
          public static void main(String argv[]) {
              List o = new List(10);
              AccessibleSelection c =
                      o.getAccessibleContext().getAccessibleSelection();

              for (int i = 0; i < 10; i++) {
                  o.add("Test" + i);
              }

              o.select(4);

              c.clearAccessibleSelection();
          }

      }
      ------------- JDK1.3L output ---------------
      Warning: JIT compiler "sunwjit" not found. Will use interpreter.
      Exception in thread "main" java.lang.ArrayIndexOutOfBoundsException: 1
              at java.awt.List$AccessibleAWTList.clearAccessibleSelection(List.java:1247)
              at Test.main(Test.java:16)

      ======================================================================

            prssunw Prs Prs (Inactive)
            alisunw Ali Ali (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: