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

ClipboardContent: javadoc != code

    XMLWordPrintable

Details

    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

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

            Dates

              Created:
              Updated:
              Resolved:
              Imported: