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

AccessibleJComboBox.getAccessibleSelection(int) method works incorrectly

XMLWordPrintable

      AccessibleJComboBox.getAccessibleSelection(int) method incorrectly returns
      null, in JDK1.4.0beta-b40. It works correctly in previous builds.

      See example

      ---------- Tests.java ----------------
      import javax.swing.*;
      import javax.accessibility.*;

      public class Test {
                          
          public static void main(String argv[]) {
              JComboBox o = new JComboBox();
              o.addItem("Test");

              AccessibleSelection c =
                      o.getAccessibleContext().getAccessibleSelection();
          
              o.setSelectedIndex(0);
              System.out.println("getAccessibleSelection(0) returns "
      + c.getAccessibleSelection(0));
                   
          }
                          
      }

      ------------- JDK1.4.0beta-b89 output-------------------------
      getAccessibleSelection(0) returns null

      ------------- JDK1.4.0beta-b35 output-------------------------
      getAccessibleSelection(0) returns javax.swing.JList$AccessibleJList$AccessibleJListChild@462851
      --------------------------------------------------------------

      We have filed similar bug #4401715 wich is now in fixed state,
      but the problem still exists. Also this bug is a regression,
      hence it should be fixed and integrated in merlin.

      The corresponding JCK test now is excluded, and appropriate entry
      is appeared in red bugs exclude list, wich should empty till the
      JCK code freeze. So we need this bug to be fixed.

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

            Unassigned Unassigned
            knasunw Kna Kna (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: