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

ClipboardContent: javadoc != code

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: P3
    • Resolution: Fixed
    • Affects Version/s: 7u7
    • Fix Version/s: 8
    • Component/s: javafx

      Description

      javafx.scene.input.ClipboardContent.putString(String) and other putXXX methods are documented as follows:
      - returns true if value was put on clipboard
      - value is cleared if null is passed

      Both is not consistent with the code:
      - code would return false if value was put on clipboard (returns true when putXXX call is made twice ;-)
      - null argument throws NPE

      Actually, the doc is inconsistent in itself:
      - "Setting this value to null effectively clears it from the clipboard."
      - "throws java.lang.NullPointerException - if null reference is passed"

        Attachments

          Activity

            People

            • Assignee:
              psafrata Pavel Ĺ afrata
              Reporter:
              wlehmann Werner Lehmann
            • Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:
                Imported: