Menu

#158 XML indenter NPE

closed-fixed
None
5
2009-09-06
2003-08-13
No

When trying to indent a (undoubtedly not 100% valid
HTML) file I get an NPE:

[error] BeanShellAction: java.lang.NullPointerException
[error] BeanShellAction: at
java.text.MessageFormat.applyPattern(MessageFormat.java:411)
[error] BeanShellAction: at
java.text.MessageFormat.<init>(MessageFormat.java:347)
[error] BeanShellAction: at
java.text.MessageFormat.format(MessageFormat.java:800)
[error] BeanShellAction: at
xmlindenter.XmlIndenterPlugin.processException(Unknown
Source)
[error] BeanShellAction: at
xmlindenter.XmlIndenterPlugin.indentXml(Unknown Source)
[error] BeanShellAction: at
sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
[error] BeanShellAction: at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
[error] BeanShellAction: at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
[error] BeanShellAction: at
java.lang.reflect.Method.invoke(Method.java:324)
[error] BeanShellAction: at
bsh.Reflect.invokeOnMethod(Unknown Source)
[error] BeanShellAction: at
bsh.Reflect.invokeStaticMethod(Unknown Source)
[error] BeanShellAction: at
bsh.Name.invokeMethod(Unknown Source)
[error] BeanShellAction: at
bsh.BSHMethodInvocation.eval(Unknown Source)
[error] BeanShellAction: at
bsh.BSHPrimaryExpression.eval(Unknown Source)
[error] BeanShellAction: at
bsh.BSHPrimaryExpression.eval(Unknown Source)
[error] BeanShellAction: at
bsh.BSHBlock.evalBlock(Unknown Source)
[error] BeanShellAction: at bsh.BSHBlock.eval(Unknown
Source)
[error] BeanShellAction: at
bsh.BshMethod.invokeImpl(Unknown Source)
[error] BeanShellAction: at
bsh.BshMethod.invoke(Unknown Source)
[error] BeanShellAction: at
bsh.BshMethod.invoke(Unknown Source)
[error] BeanShellAction: at
org.gjt.sp.jedit.BeanShell.runCachedBlock(Unknown Source)
[error] BeanShellAction: at
org.gjt.sp.jedit.BeanShellAction.invoke(Unknown Source)
[error] BeanShellAction: at
org.gjt.sp.jedit.gui.InputHandler.invokeAction(Unknown
Source)
[error] BeanShellAction: at
org.gjt.sp.jedit.jEdit$3.invokeAction(Unknown Source)
[error] BeanShellAction: at
org.gjt.sp.jedit.EditAction$Wrapper.actionPerformed(Unknown
Source)
[error] BeanShellAction: at
javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1786)
[error] BeanShellAction: at
javax.swing.AbstractButton$ForwardActionEvents.actionPerformed(AbstractButton.java:1839)
[error] BeanShellAction: at
javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:420)
[error] BeanShellAction: at
javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:258)
[error] BeanShellAction: at
javax.swing.AbstractButton.doClick(AbstractButton.java:289)
[error] BeanShellAction: at
javax.swing.plaf.basic.BasicMenuItemUI.doClick(BasicMenuItemUI.java:1113)
[error] BeanShellAction: at
javax.swing.plaf.basic.BasicMenuItemUI$MouseInputHandler.mouseReleased(BasicMenuItemUI.java:943)
[error] BeanShellAction: at
java.awt.AWTEventMulticaster.mouseReleased(AWTEventMulticaster.java:231)
[error] BeanShellAction: at
java.awt.Component.processMouseEvent(Component.java:5099)
[error] BeanShellAction: at
java.awt.Component.processEvent(Component.java:4896)
[error] BeanShellAction: at
java.awt.Container.processEvent(Container.java:1569)
[error] BeanShellAction: at
java.awt.Component.dispatchEventImpl(Component.java:3614)
[error] BeanShellAction: at
java.awt.Container.dispatchEventImpl(Container.java:1627)
[error] BeanShellAction: at
java.awt.Component.dispatchEvent(Component.java:3476)
[error] BeanShellAction: at
java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:3483)
[error] BeanShellAction: at
java.awt.LightweightDispatcher.processMouseEvent(Container.java:3198)
[error] BeanShellAction: at
java.awt.LightweightDispatcher.dispatchEvent(Container.java:3128)
[error] BeanShellAction: at
java.awt.Container.dispatchEventImpl(Container.java:1613)
[error] BeanShellAction: at
java.awt.Window.dispatchEventImpl(Window.java:1606)
[error] BeanShellAction: at
java.awt.Component.dispatchEvent(Component.java:3476)
[error] BeanShellAction: at
java.awt.EventQueue.dispatchEvent(EventQueue.java:456)
[error] BeanShellAction: at
java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:201)
[error] BeanShellAction: at
java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:151)
[error] BeanShellAction: at
java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:145)
[error] BeanShellAction: at
java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:137)
[error] BeanShellAction: at
java.awt.EventDispatchThread.run(EventDispatchThread.java:100)

Discussion

  • Reinout van Schouwen

    The offending HTML file

     
  • Alan Ezust

    Alan Ezust - 2006-09-04

    Logged In: YES
    user_id=935841

    XML indenter can only indent things it can parse, which
    means it only works on 100% XML files. Therefore, the proper
    behavior for the plugin is just to fail with a message,
    rather than have an NPE.

     
  • Alan Ezust

    Alan Ezust - 2006-09-04
    • assigned_to: nobody --> robmckinnon
     
  • Eric Le Lay

    Eric Le Lay - 2009-09-06

    fixed in XML plugin in r16166.
    Won't be fixed in the standalong XMLIndenter plugin

     
  • Eric Le Lay

    Eric Le Lay - 2009-09-06
    • status: open --> closed-fixed
     

Log in to post a comment.