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

Internal hint engine for EE feature resolves class version to JDK6

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 12.0
    • Fix Version/s: None
    • Environment:

      Description

      Simple test class using JDK14 feature (e.g. record) always throws Exception while resolving hints.

      javax.lang.model.element.UnknownElementException: Unknown element: "javaapplication1.JavaApplication1.Point"
      	at java.compiler@14/javax.lang.model.util.AbstractElementVisitor6.visitUnknown(AbstractElementVisitor6.java:126)
      	at java.compiler@14/javax.lang.model.util.ElementKindVisitor6.visitTypeAsRecord(ElementKindVisitor6.java:240)
      	at java.compiler@14/javax.lang.model.util.ElementKindVisitor6.visitType(ElementKindVisitor6.java:160)
      	at jdk.compiler/com.sun.tools.javac.code.Symbol$ClassSymbol.accept(Symbol.java:1522)
      	at org.netbeans.modules.websvc.editor.hints.common.RulesEngine.visitTypeAsClass(RulesEngine.java:61)
      	at org.netbeans.modules.websvc.editor.hints.common.RulesEngine.visitTypeAsClass(RulesEngine.java:37)
      	at java.compiler@14/javax.lang.model.util.ElementKindVisitor6.visitType(ElementKindVisitor6.java:151)
      	at jdk.compiler/com.sun.tools.javac.code.Symbol$ClassSymbol.accept(Symbol.java:1522)
      	at org.netbeans.modules.websvc.editor.hints.WebServicesHintsProvider.run(WebServicesHintsProvider.java:112)
      	at org.netbeans.modules.websvc.editor.hints.WebServicesHintsProvider$ProblemFinderCompInfo.run(WebServicesHintsProvider.java:187)
      [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)
      

      Reproduce:
      1. Create Java Application (tested with and and maven based project)
      2. Write some simple JDK14 record class
      3. Activate EE feature if not activated yet

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                graben Benjamin Graf
                Reporter:
                graben Benjamin Graf
              • Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 0.5h
                  0.5h