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

FileNotFound Exception when fields blank and hitting ok and apply

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Major
    • Resolution: Unresolved
    • 11.3
    • None
    • editor - Options

    Description

      Its about the new LSP/Textmate UI integration and It is about error handling, because the behaviour is not very nice.

      Steps to reproduce:

      • Open a project (Only to initialize the editor and the specific options)
      • Open Tools -> Options -> Editor -> Language Servers
      • Click on Add
      • Leave everything empty
      • Click on on
      • Liune will be added with default icon and the placeholder word "files"
      • Hit apply in the options window.
      • See error message thrown.
      java.io.FileNotFoundException: 
      	at java.base/java.io.FileInputStream.open0(Native Method)
      	at java.base/java.io.FileInputStream.open(FileInputStream.java:219)
      	at java.base/java.io.FileInputStream.<init>(FileInputStream.java:157)
      	at org.eclipse.tm4e.core.registry.Registry.loadGrammarFromPathSync(Registry.java:140)
      	at org.netbeans.modules.lsp.client.options.LanguageStorage.findScope(LanguageStorage.java:231)
      [catch] at org.netbeans.modules.lsp.client.options.LanguageStorage.lambda$store$1(LanguageStorage.java:115)
      	at org.openide.filesystems.FileUtil$2.run(FileUtil.java:413)
      	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.filesystems.FileUtil.runAtomicAction(FileUtil.java:417)
      	at org.netbeans.modules.lsp.client.options.LanguageStorage.store(LanguageStorage.java:65)
      	at org.netbeans.modules.lsp.client.options.LanguageServersPanel.store(LanguageServersPanel.java:193)
      	at org.netbeans.modules.lsp.client.options.LanguageServersOptionsPanelController$1.run(LanguageServersOptionsPanelController.java:51)
      	at java.desktop/java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:313)
      	at java.desktop/java.awt.EventQueue.dispatchEventImpl(EventQueue.java:770)
      	at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:721)
      	at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:715)
      	at java.base/java.security.AccessController.doPrivileged(Native Method)
      	at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:85)
      	at java.desktop/java.awt.EventQueue.dispatchEvent(EventQueue.java:740)
      	at org.netbeans.core.TimableEventQueue.dispatchEvent(TimableEventQueue.java:136)
      	at java.desktop/java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:203)
      	at java.desktop/java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:124)
      	at java.desktop/java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:113)
      	at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:109)
      	at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)
      	at java.desktop/java.awt.EventDispatchThread.run(EventDispatchThread.java:90)
      

      So I prefer to add validation. Make the name not optional. It should have a name. thats all. Icon also but you add the default one, that is okish. Maybe the lexer file need also be required, I think this is why the error is thrown.

      Attachments

        Activity

          People

            jlahoda Jan Lahoda
            chrizzly Christian Lenz
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated: