Return-Path: Delivered-To: apmail-harmony-commits-archive@www.apache.org Received: (qmail 2039 invoked from network); 31 Jul 2007 12:19:20 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 31 Jul 2007 12:19:20 -0000 Received: (qmail 74232 invoked by uid 500); 31 Jul 2007 12:19:15 -0000 Delivered-To: apmail-harmony-commits-archive@harmony.apache.org Received: (qmail 74206 invoked by uid 500); 31 Jul 2007 12:19:15 -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 74187 invoked by uid 99); 31 Jul 2007 12:19:15 -0000 Received: from Unknown (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 31 Jul 2007 05:19:15 -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, 31 Jul 2007 12:19:13 +0000 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id 019FF7141F0 for ; Tue, 31 Jul 2007 05:18:53 -0700 (PDT) Message-ID: <13452573.1185884333004.JavaMail.jira@brutus> Date: Tue, 31 Jul 2007 05:18:53 -0700 (PDT) From: "Alexey Petrenko (JIRA)" To: commits@harmony.apache.org Subject: [jira] Commented: (HARMONY-4570) [classlib][swing][html] HTMLEditorKit throws exception on unknown tag In-Reply-To: <28117870.1185814913121.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-4570?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12516684 ] Alexey Petrenko commented on HARMONY-4570: ------------------------------------------ The test has been applied with the patch of course. > [classlib][swing][html] HTMLEditorKit throws exception on unknown tag > --------------------------------------------------------------------- > > Key: HARMONY-4570 > URL: https://issues.apache.org/jira/browse/HARMONY-4570 > Project: Harmony > Issue Type: Bug > Components: Classlib > Reporter: Vasily Zakharov > Assignee: Alexey Petrenko > Attachments: Harmony-4570-Test.patch, test.zip > > > If the following page is opened in Harmony: > > > Page B > > > Page B > > > the following exception is thrown: > java.lang.UnsupportedOperationException: Not implemented tag: wrong > at javax.swing.text.html.HTMLEditorKit$HTMLFactory.create(HTMLEditorKit.java:151) > at javax.swing.text.CompositeView.loadChildren(CompositeView.java:235) > at javax.swing.text.FlowView$LogicalView.loadChildren(FlowView.java:259) > at javax.swing.text.CompositeView.setParent(CompositeView.java:116) > at javax.swing.text.FlowView.createLogicalView(FlowView.java:44) > at javax.swing.text.FlowView.loadChildren(FlowView.java:393) > at javax.swing.text.CompositeView.setParent(CompositeView.java:116) > at javax.swing.text.html.ParagraphView.setParent(ParagraphView.java:78) > at javax.swing.text.CompositeView.replace(CompositeView.java:90) > at javax.swing.text.BoxView.replace(BoxView.java:150) > at javax.swing.text.CompositeView.loadChildren(CompositeView.java:238) > at javax.swing.text.CompositeView.setParent(CompositeView.java:116) > at javax.swing.text.html.BlockView.setParent(BlockView.java:61) > at javax.swing.text.CompositeView.replace(CompositeView.java:90) > at javax.swing.text.BoxView.replace(BoxView.java:150) > at javax.swing.text.CompositeView.loadChildren(CompositeView.java:238) > at javax.swing.text.CompositeView.setParent(CompositeView.java:116) > at javax.swing.text.html.BlockView.setParent(BlockView.java:61) > at javax.swing.text.RootView.replace(RootView.java:266) > at javax.swing.text.View.append(View.java:273) > at javax.swing.plaf.basic.BasicTextUI.setView(BasicTextUI.java:864) > at javax.swing.plaf.basic.BasicTextUI.modelChanged(BasicTextUI.java:767) > at javax.swing.plaf.basic.BasicTextUI$Listener.propertyChange(BasicTextUI.java:293) > at java.beans.PropertyChangeSupport.doFirePropertyChange(PropertyChangeSupport.java:263) > at java.beans.PropertyChangeSupport.firePropertyChange(PropertyChangeSupport.java:54) > at java.awt.Component.firePropertyChangeImpl(Component.java:1668) > at java.awt.Component.firePropertyChange(Component.java:1682) > at javax.swing.text.JTextComponent.setDocument(JTextComponent.java:143) > at javax.swing.JEditorPane.setPage(JEditorPane.java:747) > at javax.swing.JEditorPane.(JEditorPane.java:310) > at TestUOE.main(TestUOE.java:8) > The same happens for any tag HTMLEditorKit is not aware of. This is surely a bug and must be fixed. > To reproduce, unpack the attached test.zip archive and run 'java TestUOE'. The same test is also usable as a regression. > Moreover, this exception is rather destructive, and after it's thrown, the following click or mouse move causes the following exception: > 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:68) > at java.awt.EventDispatchThread.run(EventDispatchThread.java:48) > and any following click or mouse move throws another one: > java.lang.ArrayIndexOutOfBoundsException: Array index out of range: -1 > at javax.swing.text.BoxView.getOffset(BoxView.java:30) > at javax.swing.text.BoxView.getViewAtPoint(BoxView.java:319) > at javax.swing.text.CompositeView.viewToModel(CompositeView.java:197) > at javax.swing.text.BoxView.viewToModel(BoxView.java:198) > at javax.swing.text.RootView.viewToModel(RootView.java:242) > at javax.swing.plaf.basic.BasicTextUI.viewToModel(BasicTextUI.java:995) > at javax.swing.plaf.basic.BasicTextUI.viewToModel(BasicTextUI.java:990) > at javax.swing.text.JTextComponent.viewToModel(JTextComponent.java:1589) > at javax.swing.text.html.HTMLEditorKit$LinkController.getLinkElement(HTMLEditorKit.java:42) > at javax.swing.text.html.HTMLEditorKit$LinkController.mouseMoved(HTMLEditorKit.java:354) > at java.awt.Component.processMouseMotionEventImpl(Component.java:3986) > at java.awt.Component.processMouseMotionEvent(Component.java:45) > at java.awt.Component.processEvent(Component.java:3641) > at java.awt.Container.processEvent(Container.java:1293) > at java.awt.Component.dispatchEvent(Component.java:3547) > at java.awt.EventQueueCore.dispatchEventImpl(EventQueueCore.java:149) > at java.awt.EventQueue.dispatchEvent(EventQueue.java:144) > at java.awt.EventDispatchThread.runModalLoop(EventDispatchThread.java:68) > at java.awt.EventDispatchThread.run(EventDispatchThread.java:48) > To reproduce, unpack the attached test.zip archive and run 'java TestNPE', and click the 'Page B' link. > Note: these exceptions occur in EventDispatchThread, so to see them, please uncomment the "t.printStackTrace()" line in java.awt.EventDispatchThread (line 89). -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.