Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

NullPointerException when configuration file not found #41

Closed
Sandra121289 opened this issue Jun 10, 2014 · 1 comment
Closed

NullPointerException when configuration file not found #41

Sandra121289 opened this issue Jun 10, 2014 · 1 comment
Labels
Milestone

Comments

@Sandra121289
Copy link

The following NullPointerException is thrown when the configuration file for the formatter is not found:

SEVERE [global]
java.lang.NullPointerException
    at de.markiewb.netbeans.plugins.eclipse.formatter.xml.ConfigReader.read(ConfigReader.java:38)
    at de.markiewb.netbeans.plugins.eclipse.formatter.EclipseFormatter.format(EclipseFormatter.java:79)
    at de.markiewb.netbeans.plugins.eclipse.formatter.EclipseFormatter.forCode(EclipseFormatter.java:121)
    at de.markiewb.netbeans.plugins.eclipse.formatter.EclipseFormatterUtilities$EclipseFormatterTask.run(EclipseFormatterUtilities.java:127)
    at org.netbeans.editor.GuardedDocument.runAtomic(GuardedDocument.java:321)
    at org.openide.text.NbDocument.runAtomic(NbDocument.java:436)
    at de.markiewb.netbeans.plugins.eclipse.formatter.EclipseFormatterUtilities.reFormatWithEclipse(EclipseFormatterUtilities.java:61)
    at de.markiewb.netbeans.plugins.eclipse.formatter.FormatJavaAction.format(FormatJavaAction.java:50)
    at de.markiewb.netbeans.plugins.eclipse.formatter.ReformatWithEclipseAction.actionPerformed(ReformatWithEclipseAction.java:65)
    at org.openide.awt.AlwaysEnabledAction$1.run(AlwaysEnabledAction.java:198)
    at org.openide.util.actions.ActionInvoker$1.run(ActionInvoker.java:95)
    at org.openide.util.actions.ActionInvoker.doPerformAction(ActionInvoker.java:116)
    at org.openide.util.actions.ActionInvoker.invokeAction(ActionInvoker.java:99)
    at org.openide.awt.AlwaysEnabledAction.actionPerformed(AlwaysEnabledAction.java:201)
    at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:2018)
    at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2341)
    at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:402)
    at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:259)
    at javax.swing.AbstractButton.doClick(AbstractButton.java:376)
    at javax.swing.plaf.basic.BasicMenuItemUI.doClick(BasicMenuItemUI.java:833)
    at javax.swing.plaf.basic.BasicMenuItemUI$Handler.mouseReleased(BasicMenuItemUI.java:877)
    at java.awt.Component.processMouseEvent(Component.java:6505)
    at javax.swing.JComponent.processMouseEvent(JComponent.java:3320)
    at java.awt.Component.processEvent(Component.java:6270)
    at java.awt.Container.processEvent(Container.java:2229)
    at java.awt.Component.dispatchEventImpl(Component.java:4861)
    at java.awt.Container.dispatchEventImpl(Container.java:2287)
    at java.awt.Component.dispatchEvent(Component.java:4687)
    at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4832)
    at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4492)
    at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4422)
    at java.awt.Container.dispatchEventImpl(Container.java:2273)
    at java.awt.Window.dispatchEventImpl(Window.java:2719)
    at java.awt.Component.dispatchEvent(Component.java:4687)
    at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:735)
    at java.awt.EventQueue.access$200(EventQueue.java:103)
    at java.awt.EventQueue$3.run(EventQueue.java:694)
    at java.awt.EventQueue$3.run(EventQueue.java:692)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:76)
    at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:87)
    at java.awt.EventQueue$4.run(EventQueue.java:708)
    at java.awt.EventQueue$4.run(EventQueue.java:706)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:76)
    at java.awt.EventQueue.dispatchEvent(EventQueue.java:705)
    at org.netbeans.core.TimableEventQueue.dispatchEvent(TimableEventQueue.java:159)
[catch] at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:242)
    at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:161)
    at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:150)
    at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:146)
    at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:138)
    at java.awt.EventDispatchThread.run(EventDispatchThread.java:91)
@markiewb
Copy link
Collaborator

Fixed in 1.7.1

@markiewb markiewb added this to the 1.7.1 milestone Jun 10, 2014
@markiewb markiewb added the bug label Jun 10, 2014
markiewb added a commit that referenced this issue Jun 10, 2014
* feature/issue-41-NPEwhenFileNotFound:
  issue #41: NullPointerException when configuration file not found
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants