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

Java7 Jtree.getSelectionPaths() returned value

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Duplicate
    • Icon: P4 P4
    • 8-pool
    • 7
    • client-libs
    • 7
    • x86
    • windows_7

      FULL PRODUCT VERSION :


      ADDITIONAL OS VERSION INFORMATION :
      Microsoft Windows [Version 6.1.7601]


      A DESCRIPTION OF THE PROBLEM :
      By documentation of Java 7 returned value of JTree.getSelectionPaths() should be null if nothing selected. See

      http://download.oracle.com/javase/7/docs/api/javax/swing/JTree.html#getSelectionPaths()

      " Returns:
      an array of TreePath objects indicating the selected nodes, or null if nothing is currently selected."

      getSelectionPaths() of the default JTree selection model return empty array of TreePath

      In the oldest versions of the Java it was return null. Previous versions of our product dont working with Java 7.



      STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
      1. Create JTree.
      2. In the code call getSelectionPaths() when nothing selected in the tree.

      EXPECTED VERSUS ACTUAL BEHAVIOR :
      EXPECTED -
      getSelectionPath should return null
      ACTUAL -
      gSelectionPath return empty array of TreePath

      REPRODUCIBILITY :
      This bug can be reproduced always.

            rupashka Pavel Porvatov (Inactive)
            webbuggrp Webbug Group
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: