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

TreeSelectionEvent.getNewLeadSelectionPath can be null

    XMLWordPrintable

Details

    • Bug
    • Resolution: Not an Issue
    • P4
    • None
    • 6u14
    • client-libs

    Description

      FULL PRODUCT VERSION :
      java version "1.6.0_14"
      Java(TM) SE Runtime Environment (build 1.6.0_14-b08)
      Java HotSpot(TM) Client VM (build 14.0-b16, mixed mode, sharing)


      ADDITIONAL OS VERSION INFORMATION :
      Microsoft Windows XP [Version 5.1.2600]

      EXTRA RELEVANT SYSTEM CONFIGURATION :
      Windows PLAF

      A DESCRIPTION OF THE PROBLEM :
      JavaDocs for TreeSelectionEvent.getNewLeadSelectionPath say: "Returns the current lead path.". Actually at runtime it happens that the method does not return a lead path, but returns null. To prevent NullPointerExceptions, JavaDocs should mention the method can return null.

      EXPECTED VERSUS ACTUAL BEHAVIOR :
      EXPECTED -
      JavaDocs should say that the result can be null.
      ACTUAL -
      JavaDocs do not say that the result can be null.

      REPRODUCIBILITY :
      This bug can be reproduced always.

      Attachments

        Activity

          People

            alexp Alexander Potochkin (Inactive)
            ndcosta Nelson Dcosta (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: