-
Bug
-
Resolution: Duplicate
-
P3
-
None
-
5.0
-
x86
-
linux_redhat_8.0
pasting null to text area or text field does not delete the selected text.
On solaris the selected text gets deleted with XAWT option.
On Linux8 (redhat) the selected text will not be deleted with tiger b17 but gets deleted with jdk 1.4.2 (b27). This is regression from 1.4.2
test case:
import java.awt.*;
import java.awt.datatransfer.*;
public class Test {
public static void main(String[] args) {
Frame frame = new Frame();
frame.setBounds(50, 50, 200, 200);
frame.setLayout(new GridLayout());
frame.add(new TextArea("textarea"));
frame.add(new TextField("textField"));
Toolkit.getDefaultToolkit().getSystemClipboard().setContents
(new StringSelection(null), null);
frame.show();
}
}
Steps to reproduce:
1. Compile and run the above program.
2. select few leters in text area and try to paste (using ctrl+V).
3. Selected text will not be deleted with tiger b17 but gets deleted with jdk 1.4.2
4. Repeat step 2 for text field, result is same as step 3.
- duplicates
-
JDK-4915529 REGRESSION: java/awt/Clipboard/PasteNullToTextComponentsTest/PasteNullToTextComp
-
- Closed
-