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

Cannot use Jackpot30 on HTML/Java API

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Major
    • Resolution: Unresolved
    • 11.1
    • None
    • java - Refactoring
    • None

    Description

      I am trying to eliminate use of lamdas in HTML/Java Generics processor. One option is to switch to target level 1.7, but then I'd have to avoid using text blocks. The other option is to keep target level 1.8, but use a Jackpot hint to avoid lambdas.

      However last version of Jackpot cannot handle Java 15 features anyway. Apply following patch to https://github.com/apache/netbeans-html4j/

      netbeans-html4j/generic$ git diff
      diff --git a/generic/pom.xml b/generic/pom.xml
      index 6500712e..0b29e2f2 100644
      --- a/generic/pom.xml
      +++ b/generic/pom.xml
      @@ -84,10 +84,13 @@
                           <compilerArguments>
                               <Aversion>${project.version}</Aversion>
                           </compilerArguments>
      -                    <testSource>15</testSource>
      -                    <testTarget>1.8</testTarget>
                       </configuration>
                   </plugin>
      +            <plugin>
      +                <groupId>org.apache.netbeans.modules.jackpot30</groupId>
      +                <artifactId>jackpot30-maven-plugin</artifactId>
      +                <version>11.1</version>
      +            </plugin>
                   <plugin>
                       <groupId>org.apache.maven.plugins</groupId>
                       <artifactId>maven-deploy-plugin</artifactId>
      

      and then try to run Jackpot:

       netbeans-html4j/generic$ JAVA_HOME=~/bin/jdk-15 mvn jackpot30:analyze
      [INFO] Scanning for projects...
      [INFO] 
      [INFO] ---------------------< org.netbeans.html:generic >----------------------
      [INFO] Building DukeScript Generic Presenter 2.0-SNAPSHOT
      [INFO] -------------------------------[ bundle ]-------------------------------
      [INFO] 
      [INFO] --- jackpot30-maven-plugin:11.1:analyze (default-cli) @ generic ---
      java.lang.NoSuchMethodError: 'void com.sun.tools.javac.tree.JCTree$JCClassDecl.<init>(com.sun.tools.javac.tree.JCTree$JCModifiers, com.sun.tools.javac.util.Name, com.sun.tools.javac.util.List, com.sun.tools.javac.tree.JCTree$JCExpression, com.sun.tools.javac.util.List, com.sun.tools.javac.util.List, com.sun.tools.javac.code.Symbol$ClassSymbol)'
              at org.netbeans.lib.nbjavac.services.NBTreeMaker$IndexedClassDecl.<init>(NBTreeMaker.java:91)
              at org.netbeans.lib.nbjavac.services.NBTreeMaker.ClassDef(NBTreeMaker.java:75)
              at org.netbeans.lib.nbjavac.services.NBTreeMaker.ClassDef(NBTreeMaker.java:40)
              at jdk.compiler/com.sun.tools.javac.comp.Enter.<init>(Enter.java:132)
              at org.netbeans.lib.nbjavac.services.NBEnter.<init>(NBEnter.java:47)
              at org.netbeans.lib.nbjavac.services.NBEnter$1.make(NBEnter.java:38)
              at org.netbeans.lib.nbjavac.services.NBEnter$1.make(NBEnter.java:36)
              at jdk.compiler/com.sun.tools.javac.util.Context.get(Context.java:150)
              at jdk.compiler/com.sun.tools.javac.comp.Enter.instance(Enter.java:111)
              at jdk.compiler/com.sun.tools.javac.comp.DeferredAttr.<init>(DeferredAttr.java:118)
              at jdk.compiler/com.sun.tools.javac.comp.DeferredAttr.instance(DeferredAttr.java:107)
              at jdk.compiler/com.sun.tools.javac.comp.Resolve.<init>(Resolve.java:128)
              at org.netbeans.lib.nbjavac.services.NBResolve.<init>(NBResolve.java:50)
              at org.netbeans.lib.nbjavac.services.NBResolve$1.make(NBResolve.java:44)
              at org.netbeans.lib.nbjavac.services.NBResolve$1.make(NBResolve.java:42)
              at jdk.compiler/com.sun.tools.javac.util.Context.get(Context.java:150)
              at jdk.compiler/com.sun.tools.javac.comp.Resolve.instance(Resolve.java:162)
              at jdk.compiler/com.sun.tools.javac.comp.Check.<init>(Check.java:123)
              at jdk.compiler/com.sun.tools.javac.comp.Check.instance(Check.java:111)
              at jdk.compiler/com.sun.tools.javac.comp.Modules.<init>(Modules.java:189)
              at jdk.compiler/com.sun.tools.javac.comp.Modules.instance(Modules.java:179)
              at jdk.compiler/com.sun.tools.javac.code.Symtab.<init>(Symtab.java:516)
              at jdk.compiler/com.sun.tools.javac.code.Symtab.instance(Symtab.java:92)
              at jdk.compiler/com.sun.tools.javac.comp.Attr.<init>(Attr.java:136)
              at org.netbeans.lib.nbjavac.services.NBAttr.<init>(NBAttr.java:58)
              at org.netbeans.lib.nbjavac.services.NBAttr$1.make(NBAttr.java:49)
              at org.netbeans.lib.nbjavac.services.NBAttr$1.make(NBAttr.java:47)
              at jdk.compiler/com.sun.tools.javac.util.Context.get(Context.java:150)
              at jdk.compiler/com.sun.tools.javac.comp.Attr.instance(Attr.java:125)
              at jdk.compiler/com.sun.tools.javac.comp.Annotate.<init>(Annotate.java:109)
              at jdk.compiler/com.sun.tools.javac.comp.Annotate.instance(Annotate.java:84)
              at jdk.compiler/com.sun.tools.javac.jvm.ClassReader.<init>(ClassReader.java:257)
              at org.netbeans.lib.nbjavac.services.NBClassReader.<init>(NBClassReader.java:50)
              at org.netbeans.lib.nbjavac.services.NBClassReader$1.make(NBClassReader.java:41)
              at org.netbeans.lib.nbjavac.services.NBClassReader$1.make(NBClassReader.java:39)
              at jdk.compiler/com.sun.tools.javac.util.Context.get(Context.java:150)
              at jdk.compiler/com.sun.tools.javac.jvm.ClassReader.instance(ClassReader.java:248)
              at jdk.compiler/com.sun.tools.javac.code.ClassFinder.<init>(ClassFinder.java:185)
              at org.netbeans.lib.nbjavac.services.NBClassFinder.<init>(NBClassFinder.java:40)
              at org.netbeans.lib.nbjavac.services.NBClassFinder$1.make(NBClassFinder.java:34)
              at org.netbeans.lib.nbjavac.services.NBClassFinder$1.make(NBClassFinder.java:32)
              at jdk.compiler/com.sun.tools.javac.util.Context.get(Context.java:150)
              at jdk.compiler/com.sun.tools.javac.code.ClassFinder.instance(ClassFinder.java:176)
              at jdk.compiler/com.sun.tools.javac.main.JavaCompiler.<init>(JavaCompiler.java:392)
              at org.netbeans.lib.nbjavac.services.NBJavaCompiler.<init>(NBJavaCompiler.java:45)
              at org.netbeans.lib.nbjavac.services.NBJavaCompiler$1.make(NBJavaCompiler.java:37)
              at org.netbeans.lib.nbjavac.services.NBJavaCompiler$1.make(NBJavaCompiler.java:35)
              at jdk.compiler/com.sun.tools.javac.util.Context.get(Context.java:150)
              at jdk.compiler/com.sun.tools.javac.main.JavaCompiler.instance(JavaCompiler.java:113)
              at jdk.compiler/com.sun.tools.javac.model.JavacElements.<init>(JavacElements.java:109)
              at jdk.compiler/com.sun.tools.javac.model.JavacElements.instance(JavacElements.java:103)
              at jdk.compiler/com.sun.tools.javac.api.BasicJavacTask.getElements(BasicJavacTask.java:159)
              at org.netbeans.modules.java.source.parsing.CompilationInfoImpl.toPhase(CompilationInfoImpl.java:357)
              at org.netbeans.api.java.source.CompilationController.toPhase(CompilationController.java:84)
              at org.netbeans.modules.java.hints.declarative.DeclarativeHintsParser$1.run(DeclarativeHintsParser.java:480)
              at org.netbeans.modules.java.hints.declarative.DeclarativeHintsParser$1.run(DeclarativeHintsParser.java:477)
              at org.netbeans.modules.java.source.parsing.MimeTask.run(MimeTask.java:60)
              at org.netbeans.modules.parsing.impl.TaskProcessor.callUserTask(TaskProcessor.java:586)
              at org.netbeans.modules.parsing.api.ParserManager$MimeTaskAction.run(ParserManager.java:357)
              at org.netbeans.modules.parsing.api.ParserManager$MimeTaskAction.run(ParserManager.java:340)
              at org.netbeans.modules.parsing.impl.TaskProcessor$2.call(TaskProcessor.java:181)
              at org.netbeans.modules.parsing.impl.TaskProcessor$2.call(TaskProcessor.java:178)
              at org.netbeans.modules.masterfs.filebasedfs.utils.FileChangedManager.priorityIO(FileChangedManager.java:153)
              at org.netbeans.modules.masterfs.providers.ProvidedExtensions.priorityIO(ProvidedExtensions.java:335)
              at org.netbeans.modules.parsing.nb.DataObjectEnvFactory.runPriorityIO(DataObjectEnvFactory.java:118)
              at org.netbeans.modules.parsing.impl.Utilities.runPriorityIO(Utilities.java:67)
              at org.netbeans.modules.parsing.impl.TaskProcessor.runUserTask(TaskProcessor.java:178)
              at org.netbeans.modules.parsing.api.ParserManager.parse(ParserManager.java:311)
              at org.netbeans.api.java.source.JavaSource.runUserActionTaskImpl(JavaSource.java:431)
              at org.netbeans.api.java.source.JavaSource.runUserActionTask(JavaSource.java:423)
              at org.netbeans.modules.java.hints.declarative.DeclarativeHintsParser.resolve(DeclarativeHintsParser.java:477)
              at org.netbeans.modules.java.hints.declarative.DeclarativeHintsParser.access$000(DeclarativeHintsParser.java:83)
              at org.netbeans.modules.java.hints.declarative.DeclarativeHintsParser$Impl.parseCondition(DeclarativeHintsParser.java:311)
              at org.netbeans.modules.java.hints.declarative.DeclarativeHintsParser$Impl.parseConditions(DeclarativeHintsParser.java:258)
              at org.netbeans.modules.java.hints.declarative.DeclarativeHintsParser$Impl.parseRule(DeclarativeHintsParser.java:215)
              at org.netbeans.modules.java.hints.declarative.DeclarativeHintsParser$Impl.parseInput(DeclarativeHintsParser.java:184)
              at org.netbeans.modules.java.hints.declarative.DeclarativeHintsParser$Impl.access$200(DeclarativeHintsParser.java:90)
              at org.netbeans.modules.java.hints.declarative.DeclarativeHintsParser.parse(DeclarativeHintsParser.java:395)
              at org.netbeans.modules.java.hints.declarative.DeclarativeHintRegistry.parseHints(DeclarativeHintRegistry.java:263)
              at org.netbeans.modules.java.hints.declarative.DeclarativeHintRegistry.parseHintFile(DeclarativeHintRegistry.java:239)
              at org.netbeans.modules.java.hints.declarative.DeclarativeHintRegistry.readHints(DeclarativeHintRegistry.java:128)
              at org.netbeans.modules.java.hints.declarative.DeclarativeHintRegistry.computeHints(DeclarativeHintRegistry.java:111)
              at org.netbeans.modules.java.hints.spiimpl.RulesManagerImpl.readHints(RulesManagerImpl.java:139)
              at org.netbeans.modules.jackpot30.cmdline.Main.readHints(Main.java:676)
              at org.netbeans.modules.jackpot30.cmdline.Main.handleGroup(Main.java:443)
              at org.netbeans.modules.jackpot30.cmdline.Main.compile(Main.java:323)
              at org.netbeans.modules.jackpot30.cmdline.Main.main(Main.java:123)
      Exception in thread "main" java.lang.IllegalStateException: java.lang.NoSuchMethodError: 'void com.sun.tools.javac.tree.JCTree$JCClassDecl.<init>(com.sun.tools.javac.tree.JCTree$JCModifiers, com.sun.tools.javac.util.Name, com.sun.tools.javac.util.List, com.sun.tools.javac.tree.JCTree$JCExpression, com.sun.tools.javac.util.List, com.sun.tools.javac.util.List, com.sun.tools.javac.code.Symbol$ClassSymbol)'
              at org.netbeans.modules.jackpot30.cmdline.Main.compile(Main.java:342)
              at org.netbeans.modules.jackpot30.cmdline.Main.main(Main.java:123)
      Caused by: java.lang.NoSuchMethodError: 'void com.sun.tools.javac.tree.JCTree$JCClassDecl.<init>(com.sun.tools.javac.tree.JCTree$JCModifiers, com.sun.tools.javac.util.Name, com.sun.tools.javac.util.List, com.sun.tools.javac.tree.JCTree$JCExpression, com.sun.tools.javac.util.List, com.sun.tools.javac.util.List, com.sun.tools.javac.code.Symbol$ClassSymbol)'
              at org.netbeans.lib.nbjavac.services.NBTreeMaker$IndexedClassDecl.<init>(NBTreeMaker.java:91)
              at org.netbeans.lib.nbjavac.services.NBTreeMaker.ClassDef(NBTreeMaker.java:75)
              at org.netbeans.lib.nbjavac.services.NBTreeMaker.ClassDef(NBTreeMaker.java:40)
              at jdk.compiler/com.sun.tools.javac.comp.Enter.<init>(Enter.java:132)
              at org.netbeans.lib.nbjavac.services.NBEnter.<init>(NBEnter.java:47)
              at org.netbeans.lib.nbjavac.services.NBEnter$1.make(NBEnter.java:38)
              at org.netbeans.lib.nbjavac.services.NBEnter$1.make(NBEnter.java:36)
              at jdk.compiler/com.sun.tools.javac.util.Context.get(Context.java:150)
              at jdk.compiler/com.sun.tools.javac.comp.Enter.instance(Enter.java:111)
              at jdk.compiler/com.sun.tools.javac.comp.DeferredAttr.<init>(DeferredAttr.java:118)
              at jdk.compiler/com.sun.tools.javac.comp.DeferredAttr.instance(DeferredAttr.java:107)
              at jdk.compiler/com.sun.tools.javac.comp.Resolve.<init>(Resolve.java:128)
              at org.netbeans.lib.nbjavac.services.NBResolve.<init>(NBResolve.java:50)
              at org.netbeans.lib.nbjavac.services.NBResolve$1.make(NBResolve.java:44)
              at org.netbeans.lib.nbjavac.services.NBResolve$1.make(NBResolve.java:42)
              at jdk.compiler/com.sun.tools.javac.util.Context.get(Context.java:150)
              at jdk.compiler/com.sun.tools.javac.comp.Resolve.instance(Resolve.java:162)
              at jdk.compiler/com.sun.tools.javac.comp.Check.<init>(Check.java:123)
              at jdk.compiler/com.sun.tools.javac.comp.Check.instance(Check.java:111)
              at jdk.compiler/com.sun.tools.javac.comp.Modules.<init>(Modules.java:189)
              at jdk.compiler/com.sun.tools.javac.comp.Modules.instance(Modules.java:179)
              at jdk.compiler/com.sun.tools.javac.code.Symtab.<init>(Symtab.java:516)
              at jdk.compiler/com.sun.tools.javac.code.Symtab.instance(Symtab.java:92)
              at jdk.compiler/com.sun.tools.javac.comp.Attr.<init>(Attr.java:136)
              at org.netbeans.lib.nbjavac.services.NBAttr.<init>(NBAttr.java:58)
              at org.netbeans.lib.nbjavac.services.NBAttr$1.make(NBAttr.java:49)
              at org.netbeans.lib.nbjavac.services.NBAttr$1.make(NBAttr.java:47)
              at jdk.compiler/com.sun.tools.javac.util.Context.get(Context.java:150)
              at jdk.compiler/com.sun.tools.javac.comp.Attr.instance(Attr.java:125)
              at jdk.compiler/com.sun.tools.javac.comp.Annotate.<init>(Annotate.java:109)
              at jdk.compiler/com.sun.tools.javac.comp.Annotate.instance(Annotate.java:84)
              at jdk.compiler/com.sun.tools.javac.jvm.ClassReader.<init>(ClassReader.java:257)
              at org.netbeans.lib.nbjavac.services.NBClassReader.<init>(NBClassReader.java:50)
              at org.netbeans.lib.nbjavac.services.NBClassReader$1.make(NBClassReader.java:41)
              at org.netbeans.lib.nbjavac.services.NBClassReader$1.make(NBClassReader.java:39)
              at jdk.compiler/com.sun.tools.javac.util.Context.get(Context.java:150)
              at jdk.compiler/com.sun.tools.javac.jvm.ClassReader.instance(ClassReader.java:248)
              at jdk.compiler/com.sun.tools.javac.code.ClassFinder.<init>(ClassFinder.java:185)
              at org.netbeans.lib.nbjavac.services.NBClassFinder.<init>(NBClassFinder.java:40)
              at org.netbeans.lib.nbjavac.services.NBClassFinder$1.make(NBClassFinder.java:34)
              at org.netbeans.lib.nbjavac.services.NBClassFinder$1.make(NBClassFinder.java:32)
              at jdk.compiler/com.sun.tools.javac.util.Context.get(Context.java:150)
              at jdk.compiler/com.sun.tools.javac.code.ClassFinder.instance(ClassFinder.java:176)
              at jdk.compiler/com.sun.tools.javac.main.JavaCompiler.<init>(JavaCompiler.java:392)
              at org.netbeans.lib.nbjavac.services.NBJavaCompiler.<init>(NBJavaCompiler.java:45)
              at org.netbeans.lib.nbjavac.services.NBJavaCompiler$1.make(NBJavaCompiler.java:37)
              at org.netbeans.lib.nbjavac.services.NBJavaCompiler$1.make(NBJavaCompiler.java:35)
              at jdk.compiler/com.sun.tools.javac.util.Context.get(Context.java:150)
              at jdk.compiler/com.sun.tools.javac.main.JavaCompiler.instance(JavaCompiler.java:113)
              at jdk.compiler/com.sun.tools.javac.model.JavacElements.<init>(JavacElements.java:109)
              at jdk.compiler/com.sun.tools.javac.model.JavacElements.instance(JavacElements.java:103)
              at jdk.compiler/com.sun.tools.javac.api.BasicJavacTask.getElements(BasicJavacTask.java:159)
              at org.netbeans.modules.java.source.parsing.CompilationInfoImpl.toPhase(CompilationInfoImpl.java:357)
              at org.netbeans.api.java.source.CompilationController.toPhase(CompilationController.java:84)
              at org.netbeans.modules.java.hints.declarative.DeclarativeHintsParser$1.run(DeclarativeHintsParser.java:480)
              at org.netbeans.modules.java.hints.declarative.DeclarativeHintsParser$1.run(DeclarativeHintsParser.java:477)
              at org.netbeans.modules.java.source.parsing.MimeTask.run(MimeTask.java:60)
              at org.netbeans.modules.parsing.impl.TaskProcessor.callUserTask(TaskProcessor.java:586)
              at org.netbeans.modules.parsing.api.ParserManager$MimeTaskAction.run(ParserManager.java:357)
              at org.netbeans.modules.parsing.api.ParserManager$MimeTaskAction.run(ParserManager.java:340)
              at org.netbeans.modules.parsing.impl.TaskProcessor$2.call(TaskProcessor.java:181)
              at org.netbeans.modules.parsing.impl.TaskProcessor$2.call(TaskProcessor.java:178)
              at org.netbeans.modules.masterfs.filebasedfs.utils.FileChangedManager.priorityIO(FileChangedManager.java:153)
              at org.netbeans.modules.masterfs.providers.ProvidedExtensions.priorityIO(ProvidedExtensions.java:335)
              at org.netbeans.modules.parsing.nb.DataObjectEnvFactory.runPriorityIO(DataObjectEnvFactory.java:118)
              at org.netbeans.modules.parsing.impl.Utilities.runPriorityIO(Utilities.java:67)
              at org.netbeans.modules.parsing.impl.TaskProcessor.runUserTask(TaskProcessor.java:178)
              at org.netbeans.modules.parsing.api.ParserManager.parse(ParserManager.java:311)
              at org.netbeans.api.java.source.JavaSource.runUserActionTaskImpl(JavaSource.java:431)
              at org.netbeans.api.java.source.JavaSource.runUserActionTask(JavaSource.java:423)
              at org.netbeans.modules.java.hints.declarative.DeclarativeHintsParser.resolve(DeclarativeHintsParser.java:477)
              at org.netbeans.modules.java.hints.declarative.DeclarativeHintsParser.access$000(DeclarativeHintsParser.java:83)
              at org.netbeans.modules.java.hints.declarative.DeclarativeHintsParser$Impl.parseCondition(DeclarativeHintsParser.java:311)
              at org.netbeans.modules.java.hints.declarative.DeclarativeHintsParser$Impl.parseConditions(DeclarativeHintsParser.java:258)
              at org.netbeans.modules.java.hints.declarative.DeclarativeHintsParser$Impl.parseRule(DeclarativeHintsParser.java:215)
              at org.netbeans.modules.java.hints.declarative.DeclarativeHintsParser$Impl.parseInput(DeclarativeHintsParser.java:184)
              at org.netbeans.modules.java.hints.declarative.DeclarativeHintsParser$Impl.access$200(DeclarativeHintsParser.java:90)
              at org.netbeans.modules.java.hints.declarative.DeclarativeHintsParser.parse(DeclarativeHintsParser.java:395)
              at org.netbeans.modules.java.hints.declarative.DeclarativeHintRegistry.parseHints(DeclarativeHintRegistry.java:263)
              at org.netbeans.modules.java.hints.declarative.DeclarativeHintRegistry.parseHintFile(DeclarativeHintRegistry.java:239)
              at org.netbeans.modules.java.hints.declarative.DeclarativeHintRegistry.readHints(DeclarativeHintRegistry.java:128)
              at org.netbeans.modules.java.hints.declarative.DeclarativeHintRegistry.computeHints(DeclarativeHintRegistry.java:111)
              at org.netbeans.modules.java.hints.spiimpl.RulesManagerImpl.readHints(RulesManagerImpl.java:139)
              at org.netbeans.modules.jackpot30.cmdline.Main.readHints(Main.java:676)
              at org.netbeans.modules.jackpot30.cmdline.Main.handleGroup(Main.java:443)
              at org.netbeans.modules.jackpot30.cmdline.Main.compile(Main.java:323)
              ... 1 more
      [INFO] ------------------------------------------------------------------------
      [INFO] BUILD SUCCESS
      [INFO] ------------------------------------------------------------------------
      [INFO] Total time:  4.647 s
      [INFO] Finished at: 2020-12-28T07:23:45+01:00
      [INFO] ------------------------------------------------------------------------
      

       

      Attachments

        Activity

          People

            jlahoda Jan Lahoda
            jtulach Jaroslav Tulach
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated: