Return-Path: Delivered-To: apmail-harmony-commits-archive@www.apache.org Received: (qmail 42960 invoked from network); 2 Oct 2007 12:19:41 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 2 Oct 2007 12:19:41 -0000 Received: (qmail 71155 invoked by uid 500); 2 Oct 2007 12:19:31 -0000 Delivered-To: apmail-harmony-commits-archive@harmony.apache.org Received: (qmail 71135 invoked by uid 500); 2 Oct 2007 12:19:31 -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 71126 invoked by uid 99); 2 Oct 2007 12:19:31 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 02 Oct 2007 05:19:31 -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; Tue, 02 Oct 2007 12:19:41 +0000 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id 90E787141FE for ; Tue, 2 Oct 2007 05:18:50 -0700 (PDT) Message-ID: <7824526.1191327530583.JavaMail.jira@brutus> Date: Tue, 2 Oct 2007 05:18:50 -0700 (PDT) From: "Alexei Zakharov (JIRA)" To: commits@harmony.apache.org Subject: [jira] Created: (HARMONY-4887) [classlib][awt] some AWT classes may cause a dead loop MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org [classlib][awt] some AWT classes may cause a dead loop ------------------------------------------------------ Key: HARMONY-4887 URL: https://issues.apache.org/jira/browse/HARMONY-4887 Project: Harmony Issue Type: Bug Environment: any Reporter: Alexei Zakharov The following AWT classes & methods may cause repaint dead loop: java.awt Button setEnabled(boolean) setLabel(String) Checkbox setChecked(boolean) setEnabled(boolean) Choice select(int) Component setBackground(Color) setFont(Font) setForeground(Color) Label setEnabledImpl(boolean) TextComponent setEditable(boolean) setEnabled(boolean) TextField scrollRectToVisible(Rectangle) setEchoChar(char) Below is a simple reproducer for Button.setEnabled(). --- import java.awt.*; import junit.framework.TestCase; public class ButtonRTest extends TestCase { final static int DEAD_LOOP_TIMEOUT = 300; final static int VALID_NUMBER_OF_PAINT_CALLS = 3; public void testDeadLoopXXX() { final int count[] = new int[1]; Button b = new Button() { public void paint(Graphics g) { count[0]++; setEnabled(true); } }; new DummyFrame(b); try { Thread.sleep(DEAD_LOOP_TIMEOUT); } catch (Exception e) {} assertTrue("paint() called " + count[0] + " times, dead loop occurred", count[0] <= VALID_NUMBER_OF_PAINT_CALLS); } static class DummyFrame extends Frame { public DummyFrame(Component b){ add(b); setSize(300,200); setVisible(true); } } } --- -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.