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

Calling Clipboard.getContents with no owner does retrieve native clipboard data

    XMLWordPrintable

    Details

    • Subcomponent:
    • Resolved In Build:
      1.2.2
    • CPU:
      sparc
    • OS:
      solaris_2.6

      Description

      In the peer level code for AWT's Clipboard (WClipboard.java, X11Clipboard.java) a member variable called 'contents' is updated everytime the native clipboard changes to keep the Java and system clipboards in sync.

      If no ClipboardOwner has been specified for the Clipboard previously via a call to Clipboard.setContents, the 'contents' member is not updated, and so a call to getContents would retrieve the last pasted contents from Java, not whatever a native app might have pasted in the clipboard.

      The documentation specifies that specifying a 'null' owner only means that you do not want to be notified when the clipboard changes. Not specifying an owner should not get you stale data.

      The Win32 peer code has already been fixed (see bug 4177171) to always sync up the Java and native sides, so this needs to be done for Solaris as well.

      robi.khan@eng 1998-10-08

        Attachments

          Activity

            People

            Assignee:
            jmelvin James Melvin (Inactive)
            Reporter:
            rkhansunw Robi Khan (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: