You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@netbeans.apache.org by "stborchert (via GitHub)" <gi...@apache.org> on 2023/04/06 10:45:42 UTC

[GitHub] [netbeans] stborchert commented on issue #5665: java.lang.NullPointerException: Cannot invoke "org.netbeans.modules.web.indent.api.support.IndenterFormattingContext.setLastIndenter()" because "last" is null

stborchert commented on issue #5665:
URL: https://github.com/apache/netbeans/issues/5665#issuecomment-1498867190

   After updating from Netbeans v16 to v17 on MacOS I also ran into this problem. Trying to format code results in a NullPointerException:
   ```
   java.lang.NullPointerException: Cannot invoke "org.netbeans.modules.web.indent.api.support.IndenterFormattingContext.setLastIndenter()" because "last" is null
   	at org.netbeans.modules.web.indent.api.support.AbstractIndenter.beforeReindent(AbstractIndenter.java:128)
   	at org.netbeans.modules.web.indent.api.support.AbstractIndenter.reindent(AbstractIndenter.java:197)
   	at org.netbeans.modules.html.editor.indent.HtmlIndentTask.reindent(HtmlIndentTask.java:49)
   	at de.funfried.netbeans.plugins.external.formatter.ui.editor.ExternalFormatterIndentTaskFactory.formatWithNetBeansIndenter(ExternalFormatterIndentTaskFactory.java:151)
   	at de.funfried.netbeans.plugins.external.formatter.ui.editor.ExternalFormatterIndentTaskFactory$2.reindent(ExternalFormatterIndentTaskFactory.java:96)
   	at org.netbeans.modules.editor.indent.TaskHandler$MimeItem.runTask(TaskHandler.java:548)
   	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)
   	at org.netbeans.editor.ActionFactory$FormatAction$1$1.run(ActionFactory.java:1862)
   	at org.netbeans.editor.GuardedDocument.runAtomicAsUser(GuardedDocument.java:335)
   	at org.netbeans.editor.ActionFactory$FormatAction$1.run(ActionFactory.java:1841)
   	at org.netbeans.modules.progress.ui.RunOffEDTImpl$1.run(RunOffEDTImpl.java:146)
   	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:287)
   [catch] at org.openide.util.RequestProcessor$Processor.run(RequestProcessor.java:2033)
   ```
   
   Maybe #5650 is somehow related.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org
For additional commands, e-mail: notifications-help@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists