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

ListSelectionModel's getAnchorSelectionIndex()/getLeadSelectionIndex() JavaDoc's are now wrong

XMLWordPrintable

      J2SE Version (please include all output from java -version flag):
      java version "1.6.0_01"
      Java(TM) SE Runtime Environment (build 1.6.0_01-b06)
      Java HotSpot(TM) Client VM (build 1.6.0_01-b06, mixed mode, sharing)

      Does this problem occur on J2SE 1.4.x or 5.0.x or 6.0? Yes / No (pick one)
      Yes

      Operating System Configuration Information (be specific):
      Microsoft Windows XP [Version 5.1.2600]

      ListSelectionModel's getAnchorSelectionIndex()/getLeadSelectionIndex() JavaDoc's are now wrong

      ListSelectionModel's getAnchorSelectionIndex() says:
      Return the first index argument from the most recent call to setSelectionInterval(), addSelectionInterval() or removeSelectionInterval().
      It needs to also include setLeadSelectionIndex(int anIndex).

      We were relying on the selection and lead selection to always be in sync, however now
      they are no longer in sync
      as setLeadSelectionIndex(int anIndex) is getting called with
      -1 and leaving the selection unchanged.
      Bug 5053379 is possibly related to this as well.

            Unassigned Unassigned
            tyao Ting-Yun Ingrid Yao (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: