You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@harmony.apache.org by "Vasily Zakharov (JIRA)" <ji...@apache.org> on 2007/07/31 16:22:53 UTC
[jira] Closed: (HARMONY-4570) [classlib][swing][html] HTMLEditorKit
throws exception on unknown tag
[ https://issues.apache.org/jira/browse/HARMONY-4570?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Vasily Zakharov closed HARMONY-4570.
------------------------------------
Sorry, I couldn't find the patch in the commit area.
Thanks, the fix is fine, thank you.
> [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:
> <html>
> <head>
> <title>Page B</title>
> </head>
> <body>
> <wrong>Page B</wrong>
> </body>
> </html>
> 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.<init>(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.