[ https://issues.apache.org/jira/browse/HARMONY-4656?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Alexei Zakharov resolved HARMONY-4656.
--------------------------------------
Resolution: Fixed
> [classlib][awt] System ClipBoard is not initialized well in Linux
> -----------------------------------------------------------------
>
> Key: HARMONY-4656
> URL: https://issues.apache.org/jira/browse/HARMONY-4656
> Project: Harmony
> Issue Type: Bug
> Components: Classlib
> Environment: Fedora(Linux32)
> Reporter: Chunrong Lai
> Assignee: Alexei Zakharov
> Attachments: H4656.fixed.patch
>
>
> In Fedora NullException is observed in the simple example:
> import java.awt.Toolkit;
> import java.awt.datatransfer.Clipboard;
> import java.awt.datatransfer.DataFlavor;
> import java.awt.datatransfer.Transferable;
> import java.awt.datatransfer.UnsupportedFlavorException;
> import java.io.IOException;
> public class Test {
> public static void main (String argv[]) {
> Clipboard clipboard = Toolkit.getDefaultToolkit().getSystemClipboard();
> Transferable tb = clipboard.getContents(null);
> try {
> String text = (String) tb.getTransferData(DataFlavor.stringFlavor);
> if (text != null && !text.equals(""))
> {
> System.out.println("The Clipboard is not null with String");
> } else {
> System.out.println("The Clipboard is null with String");
> }
> }
> catch (UnsupportedFlavorException e){
> e.printStackTrace();
> }
> catch (IOException e){
> e.printStackTrace();
> }
> catch (Exception e){
> e.printStackTrace();
> }
> }
> }
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
|