From commits-return-43767-apmail-harmony-commits-archive=harmony.apache.org@harmony.apache.org Fri Sep 14 14:46:07 2007 Return-Path: Delivered-To: apmail-harmony-commits-archive@www.apache.org Received: (qmail 65715 invoked from network); 14 Sep 2007 14:46:03 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 14 Sep 2007 14:46:03 -0000 Received: (qmail 33257 invoked by uid 500); 14 Sep 2007 14:45:49 -0000 Delivered-To: apmail-harmony-commits-archive@harmony.apache.org Received: (qmail 33227 invoked by uid 500); 14 Sep 2007 14:45:49 -0000 Mailing-List: contact commits-help@harmony.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@harmony.apache.org Delivered-To: mailing list commits@harmony.apache.org Received: (qmail 33202 invoked by uid 99); 14 Sep 2007 14:45:49 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 14 Sep 2007 07:45:49 -0700 X-ASF-Spam-Status: No, hits=-100.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO brutus.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 14 Sep 2007 14:45:55 +0000 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id 4D59E714229 for ; Fri, 14 Sep 2007 07:45:35 -0700 (PDT) Message-ID: <1855957.1189781135314.JavaMail.jira@brutus> Date: Fri, 14 Sep 2007 07:45:35 -0700 (PDT) From: "Alexei Zakharov (JIRA)" To: commits@harmony.apache.org Subject: [jira] Resolved: (HARMONY-4656) [classlib][awt] System ClipBoard is not initialized well in Linux In-Reply-To: <18596872.1187691210400.JavaMail.jira@brutus> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org [ 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.