Return-Path: Delivered-To: apmail-harmony-commits-archive@www.apache.org Received: (qmail 1494 invoked from network); 7 Sep 2007 03:12:49 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 7 Sep 2007 03:12:49 -0000 Received: (qmail 39348 invoked by uid 500); 7 Sep 2007 03:12:44 -0000 Delivered-To: apmail-harmony-commits-archive@harmony.apache.org Received: (qmail 39200 invoked by uid 500); 7 Sep 2007 03:12:43 -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 39187 invoked by uid 99); 7 Sep 2007 03:12:43 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 06 Sep 2007 20:12:43 -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, 07 Sep 2007 03:12:48 +0000 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id F1196714209 for ; Thu, 6 Sep 2007 20:12:28 -0700 (PDT) Message-ID: <3879174.1189134748984.JavaMail.jira@brutus> Date: Thu, 6 Sep 2007 20:12:28 -0700 (PDT) From: "Vasily Zakharov (JIRA)" To: commits@harmony.apache.org Subject: [jira] Updated: (HARMONY-4755) [classlib][swing][html] JEditorPane.setPage() throws NPE In-Reply-To: <137767.1189117168560.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-4755?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Vasily Zakharov updated HARMONY-4755: ------------------------------------- Patch Info: [Patch Available] > [classlib][swing][html] JEditorPane.setPage() throws NPE > -------------------------------------------------------- > > Key: HARMONY-4755 > URL: https://issues.apache.org/jira/browse/HARMONY-4755 > Project: Harmony > Issue Type: Bug > Components: Classlib > Reporter: Vasily Zakharov > Priority: Minor > Attachments: Harmony-4755-Fix.patch > > > If JEditorPane.setPage() is called on a visible pane and passed an HTML URL, NPE occurs. > Here's the simple reproducer: > import javax.swing.JEditorPane; > import javax.swing.JFrame; > public class Test { > public static void main(String argv[]) { > try { > JFrame frame = new JFrame("Test"); > frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); > frame.setSize(100, 100); > JEditorPane pane = new JEditorPane(); > frame.add(pane); > frame.setVisible(true); > pane.setPage("file:test.html"); > } catch (Throwable e) { > e.printStackTrace(System.out); > } > } > } > test.html should exist in current directory and may be empty. > This test produces the following exception on Harmony: > java.lang.NullPointerException > at javax.swing.text.html.BlockView.paint(BlockView.java:77) > at javax.swing.text.RootView.paint(RootView.java:211) > at javax.swing.plaf.basic.BasicTextUI.paintSafely(BasicTextUI.java:839) > at javax.swing.plaf.basic.BasicTextUI.paint(BasicTextUI.java:88) > at javax.swing.plaf.ComponentUI.update(ComponentUI.java:38) > at javax.swing.plaf.basic.BasicTextUI.update(BasicTextUI.java:955) > at javax.swing.JComponent.paintComponent(JComponent.java:897) > at javax.swing.JComponent.paint(JComponent.java:994) > at javax.swing.JComponent.paintDoubleBuffered(JComponent.java:1425) > at javax.swing.JComponent.paintImmediately(JComponent.java:156) > at javax.swing.RepaintManager.paintDirtyRegions(RepaintManager.java:186) > at javax.swing.RepaintManager$1.run(RepaintManager.java:80) > at java.awt.event.InvocationEvent.runAndNotify(InvocationEvent.java:98) > at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:78) > at java.awt.EventQueueCore.dispatchEventImpl(EventQueueCore.java:138) > at java.awt.EventQueue.dispatchEvent(EventQueue.java:144) > at java.awt.EventDispatchThread.runModalLoop(EventDispatchThread.java:74) > at java.awt.EventDispatchThread.run(EventDispatchThread.java:48) > To see the exception, please enable stack trace printing at EventDispatchThread.java, line 89. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.