-
Bug
-
Resolution: Fixed
-
P4
-
1.4.0
-
None
-
mantis
-
x86, sparc
-
solaris_8, windows_nt
Date: Sat, 30 Dec 2000 16:56:05 +0300
From: "Danila A. Sinopalnikov" <###@###.###>
To: David Mendenhall <###@###.###>
Cc: ###@###.###
Subject: Re: Fix for 4250859
[...]
There is one inconsistency in handling null return value of
Transferable.getTransferData():
MTextAreaPeer.pasteFromClipboard() does nothing if getTransferData() returns
null, while MTextFieldPeer.pasteFromClipboard() and
MFileDialogPeer.pasteFromClipboard() delete the currently selected text.
[...]
Danila.
=====
I have verified that this same inconsistency exists on Windows. The following
test case can be used to reproduce the inconsistency. Paste into the Components
using:
Solaris-- Paste key
Windows-- CTRL-V or the popup context menu (right mouse click)
import java.awt.*;
import java.awt.datatransfer.*;
public class Test {
public static void main(String[] args) {
Frame f = new Frame();
f.setBounds(50, 50, 200, 200);
f.setLayout(new GridLayout());
f.add(new TextArea());
f.add(new TextField());
Toolkit.getDefaultToolkit().getSystemClipboard().setContents
(new StringSelection(null), null);
f.show();
}
}
david.mendenhall@east 2001-01-04
From: "Danila A. Sinopalnikov" <###@###.###>
To: David Mendenhall <###@###.###>
Cc: ###@###.###
Subject: Re: Fix for 4250859
[...]
There is one inconsistency in handling null return value of
Transferable.getTransferData():
MTextAreaPeer.pasteFromClipboard() does nothing if getTransferData() returns
null, while MTextFieldPeer.pasteFromClipboard() and
MFileDialogPeer.pasteFromClipboard() delete the currently selected text.
[...]
Danila.
=====
I have verified that this same inconsistency exists on Windows. The following
test case can be used to reproduce the inconsistency. Paste into the Components
using:
Solaris-- Paste key
Windows-- CTRL-V or the popup context menu (right mouse click)
import java.awt.*;
import java.awt.datatransfer.*;
public class Test {
public static void main(String[] args) {
Frame f = new Frame();
f.setBounds(50, 50, 200, 200);
f.setLayout(new GridLayout());
f.add(new TextArea());
f.add(new TextField());
Toolkit.getDefaultToolkit().getSystemClipboard().setContents
(new StringSelection(null), null);
f.show();
}
}
david.mendenhall@east 2001-01-04
- relates to
-
JDK-4771803 RegTest-test java/awt/Clipboard/PasteNullToTextComponentsTest/ failed, Linux
- Closed