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

NPE when displaying javadoc containing invalid @value annotation

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Minor
    • Resolution: Unresolved
    • 11.0, 11.1, 12.2
    • None
    • java - Javadoc
    • None

    Description

      Javadoc containing invalid (e.g. when placed on an array) @value annotations is not displayed in the Javadoc window. Instead, a NullPointerException is thrown:

      java.lang.NullPointerException
      	at org.netbeans.api.java.source.ui.ElementJavadoc.inlineTags(ElementJavadoc.java:1223)
      	at org.netbeans.api.java.source.ui.ElementJavadoc.getElementDocFromSource(ElementJavadoc.java:907)
      	at org.netbeans.api.java.source.ui.ElementJavadoc.getElementDoc(ElementJavadoc.java:742)
      	at org.netbeans.api.java.source.ui.ElementJavadoc.<init>(ElementJavadoc.java:369)
      	at org.netbeans.api.java.source.ui.ElementJavadoc.create(ElementJavadoc.java:172)
      	at org.netbeans.modules.java.navigation.CaretListeningTask.computeAndSetJavadoc(CaretListeningTask.java:263)
      	at org.netbeans.modules.java.navigation.CaretListeningTask.run(CaretListeningTask.java:221)
      	at org.netbeans.modules.java.navigation.CaretListeningTask.run(CaretListeningTask.java:55)
      [catch] at org.netbeans.modules.java.source.JavaSourceAccessor$CancelableTaskWrapper.run(JavaSourceAccessor.java:273)
      	at org.netbeans.modules.parsing.impl.TaskProcessor.callParserResultTask(TaskProcessor.java:561)
      	at org.netbeans.modules.parsing.impl.TaskProcessor$RequestPerformer.run(TaskProcessor.java:786)
      	at org.openide.util.lookup.Lookups.executeWith(Lookups.java:279)
      	at org.netbeans.modules.parsing.impl.TaskProcessor$RequestPerformer.execute(TaskProcessor.java:702)
      	at org.netbeans.modules.parsing.impl.TaskProcessor$CompilationJob.run(TaskProcessor.java:663)
      	at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515)
      	at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
      	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)
      

      This happens using NetBeans 11.1 beta3 on JDK 12.

      Product Version: Apache NetBeans IDE 11.1
      Java: 12.0.1; Java HotSpot(TM) 64-Bit Server VM 12.0.1+12
      Runtime: Java(TM) SE Runtime Environment 12.0.1+12
      System: Linux version 3.10.0-957.21.3.el7.x86_64 running on amd64; UTF-8; en_US (nb)
      User directory: /home/rene/.netbeans/11.1
      Cache directory: /home/rene/.cache/netbeans/11.1

      Attachments

        Activity

          People

            Unassigned Unassigned
            rkraneis René Kraneis
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated: