Return-Path: Delivered-To: apmail-harmony-commits-archive@www.apache.org Received: (qmail 36732 invoked from network); 20 Sep 2007 08:20:19 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 20 Sep 2007 08:20:19 -0000 Received: (qmail 6371 invoked by uid 500); 20 Sep 2007 08:20:11 -0000 Delivered-To: apmail-harmony-commits-archive@harmony.apache.org Received: (qmail 6282 invoked by uid 500); 20 Sep 2007 08:20:10 -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 6273 invoked by uid 99); 20 Sep 2007 08:20:10 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 20 Sep 2007 01:20:10 -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.3] (HELO eris.apache.org) (140.211.11.3) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 20 Sep 2007 08:22:17 +0000 Received: by eris.apache.org (Postfix, from userid 65534) id 77BF41A9832; Thu, 20 Sep 2007 01:19:56 -0700 (PDT) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r577619 - /harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/text/html/BlockView.java Date: Thu, 20 Sep 2007 08:19:56 -0000 To: commits@harmony.apache.org From: aivanov@apache.org X-Mailer: svnmailer-1.0.8 Message-Id: <20070920081956.77BF41A9832@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Author: aivanov Date: Thu Sep 20 01:19:55 2007 New Revision: 577619 URL: http://svn.apache.org/viewvc?rev=577619&view=rev Log: Applying patch for HARMONY-4755: JEditorPane.setPage() throws NPE Modified: harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/text/html/BlockView.java Modified: harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/text/html/BlockView.java URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/text/html/BlockView.java?rev=577619&r1=577618&r2=577619&view=diff ============================================================================== --- harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/text/html/BlockView.java (original) +++ harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/text/html/BlockView.java Thu Sep 20 01:19:55 2007 @@ -74,7 +74,12 @@ public void paint(final Graphics g, final Shape allocation) { Rectangle rc = allocation.getBounds(); - boxPainter.paint(g, rc.x, rc.y, rc.width, rc.height, this); + + // Fix for HARMONY-4755, boxPainter is only initialized + // after setPropertiesFromAttributes() is called. + if (boxPainter != null) { + boxPainter.paint(g, rc.x, rc.y, rc.width, rc.height, this); + } super.paint(g, allocation); }