Uploaded image for project: 'NetBeans'
  1. NetBeans
  2. NETBEANS-5240

Exception in formatter

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Major
    • Resolution: Unresolved
    • 12.2
    • None
    • None

    Description

      java.lang.NullPointerException
      	at org.netbeans.modules.java.source.save.Reformatter$Pretty.scan(Reformatter.java:587)
      	at org.netbeans.modules.java.source.save.Reformatter$Pretty.visitCase(Reformatter.java:2938)
      	at org.netbeans.modules.java.source.save.Reformatter$Pretty.visitCase(Reformatter.java:397)
      	at jdk.compiler/com.sun.tools.javac.tree.JCTree$JCCase.accept(JCTree.java:1258)
      	at jdk.compiler/com.sun.source.util.TreePathScanner.scan(TreePathScanner.java:82)
      	at org.netbeans.modules.java.source.save.Reformatter$Pretty.scan(Reformatter.java:601)
      	at org.netbeans.modules.java.source.save.Reformatter$Pretty.handleSwitch(Reformatter.java:2889)
      	at org.netbeans.modules.java.source.save.Reformatter$Pretty.visitSwitch(Reformatter.java:2790)
      	at org.netbeans.modules.java.source.save.Reformatter$Pretty.visitSwitch(Reformatter.java:397)
      	at jdk.compiler/com.sun.tools.javac.tree.JCTree$JCSwitch.accept(JCTree.java:1229)
      	at jdk.compiler/com.sun.source.util.TreePathScanner.scan(TreePathScanner.java:82)
      	at org.netbeans.modules.java.source.save.Reformatter$Pretty.scan(Reformatter.java:601)
      	at org.netbeans.modules.java.source.save.Reformatter$Pretty.visitBlock(Reformatter.java:1986)
      	at org.netbeans.modules.java.source.save.Reformatter$Pretty.visitBlock(Reformatter.java:397)
      	at jdk.compiler/com.sun.tools.javac.tree.JCTree$JCBlock.accept(JCTree.java:1032)
      	at jdk.compiler/com.sun.source.util.TreePathScanner.scan(TreePathScanner.java:82)
      	at org.netbeans.modules.java.source.save.Reformatter$Pretty.scan(Reformatter.java:601)
      	at org.netbeans.modules.java.source.save.Reformatter$Pretty.visitMethod(Reformatter.java:1559)
      	at org.netbeans.modules.java.source.save.Reformatter$Pretty.visitMethod(Reformatter.java:397)
      	at jdk.compiler/com.sun.tools.javac.tree.JCTree$JCMethodDecl.accept(JCTree.java:898)
      	at jdk.compiler/com.sun.source.util.TreePathScanner.scan(TreePathScanner.java:82)
      	at org.netbeans.modules.java.source.save.Reformatter$Pretty.scan(Reformatter.java:601)
      	at org.netbeans.modules.java.source.save.Reformatter$Pretty.visitClass(Reformatter.java:1052)
      	at org.netbeans.modules.java.source.save.Reformatter$Pretty.visitClass(Reformatter.java:397)
      	at jdk.compiler/com.sun.tools.javac.tree.JCTree$JCClassDecl.accept(JCTree.java:808)
      	at jdk.compiler/com.sun.source.util.TreePathScanner.scan(TreePathScanner.java:82)
      	at org.netbeans.modules.java.source.save.Reformatter$Pretty.scan(Reformatter.java:601)
      	at org.netbeans.modules.java.source.save.Reformatter$Pretty.visitCompilationUnit(Reformatter.java:648)
      	at org.netbeans.modules.java.source.save.Reformatter$Pretty.visitCompilationUnit(Reformatter.java:397)
      	at jdk.compiler/com.sun.tools.javac.tree.JCTree$JCCompilationUnit.accept(JCTree.java:591)
      	at jdk.compiler/com.sun.source.util.TreePathScanner.scan(TreePathScanner.java:56)
      	at org.netbeans.modules.java.source.save.Reformatter$Pretty.reformat(Reformatter.java:514)
      	at org.netbeans.modules.java.source.save.Reformatter.reformatImpl(Reformatter.java:228)
      	at org.netbeans.modules.java.source.save.Reformatter.reformat(Reformatter.java:101)
      	at org.netbeans.modules.editor.indent.TaskHandler$MimeItem.runTask(TaskHandler.java:550)
      	at org.netbeans.modules.editor.indent.TaskHandler.runTasks(TaskHandler.java:309)
      	at org.netbeans.modules.editor.indent.IndentImpl.reformat(IndentImpl.java:349)
      	at org.netbeans.modules.editor.indent.api.Reformat.reformat(Reformat.java:129)
      [catch] at org.netbeans.modules.editor.impl.ReformatBeforeSaveTask.reformat(ReformatBeforeSaveTask.java:245)
      	at org.netbeans.modules.editor.impl.ReformatBeforeSaveTask.performTask(ReformatBeforeSaveTask.java:80)
      	at org.netbeans.modules.editor.lib.BeforeSaveTasks$TaskRunnable$1.run(BeforeSaveTasks.java:148)
      	at org.netbeans.editor.GuardedDocument.runAtomicAsUser(GuardedDocument.java:333)
      	at org.netbeans.modules.editor.lib.BeforeSaveTasks$TaskRunnable.run(BeforeSaveTasks.java:131)
      	at com.junichi11.netbeans.changelf.ChangeLFImpl.runLocked(ChangeLFImpl.java:156)
      	at org.netbeans.modules.editor.lib.BeforeSaveTasks$TaskRunnable.run(BeforeSaveTasks.java:128)
      	at org.netbeans.modules.editor.lib.TrailingWhitespaceRemove.runLocked(TrailingWhitespaceRemove.java:77)
      	at org.netbeans.modules.editor.lib.BeforeSaveTasks$TaskRunnable.run(BeforeSaveTasks.java:128)
      	at org.netbeans.modules.editor.impl.ReformatBeforeSaveTask.runLocked(ReformatBeforeSaveTask.java:96)
      	at org.netbeans.modules.editor.lib.BeforeSaveTasks$TaskRunnable.run(BeforeSaveTasks.java:128)
      	at org.netbeans.modules.java.hints.onsave.RemoveUnusedAfterSave$1.run(RemoveUnusedAfterSave.java:98)
      	at org.netbeans.modules.java.hints.onsave.RemoveUnusedAfterSave$1.run(RemoveUnusedAfterSave.java:96)
      	at org.netbeans.api.java.source.JavaSource$MultiTask.run(JavaSource.java:502)
      	at org.netbeans.modules.parsing.impl.TaskProcessor.callUserTask(TaskProcessor.java:586)
      	at org.netbeans.modules.parsing.api.ParserManager$UserTaskAction.run(ParserManager.java:130)
      	at org.netbeans.modules.parsing.api.ParserManager$UserTaskAction.run(ParserManager.java:114)
      	at org.netbeans.modules.parsing.impl.TaskProcessor$2.call(TaskProcessor.java:181)
      	at org.netbeans.modules.parsing.impl.TaskProcessor$2.call(TaskProcessor.java:178)
      	at org.netbeans.modules.masterfs.filebasedfs.utils.FileChangedManager.priorityIO(FileChangedManager.java:153)
      	at org.netbeans.modules.masterfs.providers.ProvidedExtensions.priorityIO(ProvidedExtensions.java:335)
      	at org.netbeans.modules.parsing.nb.DataObjectEnvFactory.runPriorityIO(DataObjectEnvFactory.java:118)
      	at org.netbeans.modules.parsing.impl.Utilities.runPriorityIO(Utilities.java:67)
      	at org.netbeans.modules.parsing.impl.TaskProcessor.runUserTask(TaskProcessor.java:178)
      	at org.netbeans.modules.parsing.api.ParserManager.parse(ParserManager.java:81)
      	at org.netbeans.api.java.source.JavaSource.runUserActionTaskImpl(JavaSource.java:452)
      	at org.netbeans.api.java.source.JavaSource.runUserActionTask(JavaSource.java:423)
      	at org.netbeans.modules.java.hints.onsave.RemoveUnusedAfterSave.runLocked(RemoveUnusedAfterSave.java:96)
      	at org.netbeans.modules.editor.lib.BeforeSaveTasks$TaskRunnable.run(BeforeSaveTasks.java:128)
      	at org.netbeans.modules.editor.lib.BeforeSaveTasks.runTasks(BeforeSaveTasks.java:105)
      	at org.netbeans.modules.editor.lib.BeforeSaveTasks$2.run(BeforeSaveTasks.java:86)
      	at org.openide.text.CloneableEditorSupport.saveDocumentImpl(CloneableEditorSupport.java:728)
      	at org.openide.text.CloneableEditorSupport.saveDocument(CloneableEditorSupport.java:619)
      	at org.openide.text.DataEditorSupport.superSaveDoc(DataEditorSupport.java:583)
      	at org.openide.text.DataEditorSupport$SaveImpl.run(DataEditorSupport.java:1354)
      	at org.openide.filesystems.EventControl.runAtomicAction(EventControl.java:102)
      	at org.openide.filesystems.FileSystem.runAtomicAction(FileSystem.java:494)
      	at org.openide.filesystems.FileUtil.runAtomicAction(FileUtil.java:397)
      	at org.openide.text.DataEditorSupport.saveDocument(DataEditorSupport.java:579)
      	at org.netbeans.modules.openide.loaders.SimpleES$SaveCookieImpl.save(SimpleES.java:202)
      	at org.openide.actions.SaveAction.performAction(SaveAction.java:107)
      	at org.openide.actions.SaveAction.performAction(SaveAction.java:77)
      	at org.openide.actions.SaveAction$Delegate.actionPerformed(SaveAction.java:224)
      	at org.openide.awt.ContextAction$Performer.actionPerformed(ContextAction.java:446)
      	at org.openide.awt.ContextManager.actionPerformed(ContextManager.java:263)
      	at org.openide.awt.ContextAction.actionPerformed(ContextAction.java:106)
      	at org.openide.util.actions.ActionInvoker$1.run(ActionInvoker.java:68)
      	at org.openide.util.actions.ActionInvoker$ActionRunnable.actionPerformed(ActionInvoker.java:137)
      	at org.netbeans.core.ModuleActions.invokeAction(ModuleActions.java:84)
      	at org.netbeans.modules.openide.actions.ActionsBridgeImpl.invokeAction(ActionsBridgeImpl.java:35)
      	at org.openide.util.actions.ActionInvoker$ActionRunnable.doRun(ActionInvoker.java:128)
      	at org.openide.util.actions.ActionInvoker$2.run(ActionInvoker.java:85)
      	at org.openide.util.RequestProcessor$Task.run(RequestProcessor.java:1418)
      	at org.netbeans.modules.openide.util.GlobalLookup.execute(GlobalLookup.java:45)
      	at org.openide.util.lookup.Lookups.executeWith(Lookups.java:278)
      	at org.openide.util.RequestProcessor$Processor.run(RequestProcessor.java:2033)
      

      Attachments

        Activity

          People

            Unassigned Unassigned
            morvael Dominik DerwiƄski
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated: