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

IllegalArgumentException caused by FoldManagerImpl in LSP client

    XMLWordPrintableJSON

Details

    Description

      java.lang.IllegalArgumentException: Invalid end offset: -2, start is: 28
      at org.netbeans.spi.editor.fold.FoldInfo.<init>(FoldInfo.java:103)
      at org.netbeans.spi.editor.fold.FoldInfo.range(FoldInfo.java:94)
      at org.netbeans.modules.lsp.client.bindings.FoldManagerImpl.run(FoldManagerImpl.java:126)
      at org.netbeans.modules.lsp.client.LSPBindings.lambda$addBackgroundTask$13(LSPBindings.java:411)
      at org.openide.util.RequestProcessor$Task.run(RequestProcessor.java:1418)
      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)
      [catch] at org.openide.util.RequestProcessor$Processor.run(RequestProcessor.java:2033) 

      This exception occurs if a language server returns FoldingRanges without an endCharacter (only lines are set) and if the fold reaches until end of current document.

       

      Attachments

        Activity

          People

            michael.kuettner Michael Küttner
            michael.kuettner Michael Küttner
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: