Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8148033

NullPointerException at com.sun.tools.javac.comp.Flow$AssignAnalyzer.visitIdent

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: P4
    • Resolution: Duplicate
    • Affects Version/s: 8u65
    • Fix Version/s: None
    • Component/s: tools
    • Subcomponent:
    • CPU:
      x86_64
    • OS:
      linux

      Description

      FULL PRODUCT VERSION :
      java version "1.8.0_65"
      Java(TM) SE Runtime Environment (build 1.8.0_65-b17)
      Java HotSpot(TM) 64-Bit Server VM (build 25.65-b01, mixed mode)


      ADDITIONAL OS VERSION INFORMATION :
      Ubuntu 15.10,
      Linux ppadmin-OptiPlex-7010 4.2.0-23-generic #28-Ubuntu SMP Sun Dec 27 17:47:31 UTC 2015 x86_64 x86_64 x86_64 GNU/Linu

      A DESCRIPTION OF THE PROBLEM :
      Compiling the next code that throws an exception:



      EXPECTED VERSUS ACTUAL BEHAVIOR :
      EXPECTED -
      error: constructor CompilationBug in class CompilationBug cannot be applied to given types;
      ACTUAL -
      Failure executing javac, but could not parse the error:

      ERROR MESSAGES/STACK TRACES THAT OCCUR :
      Compilation failure
      Failure executing javac, but could not parse the error:
      An exception has occurred in the compiler (1.8.0_65). Please file a bug at the Java Bug Database (http://bugreport.java.com/bugreport/) after checking the database for duplicates. Include your program and the following diagnostic in your report. Thank you.
      java.lang.NullPointerException
      at com.sun.tools.javac.comp.Flow$AssignAnalyzer.visitIdent(Flow.java:2403)
      at com.sun.tools.javac.tree.JCTree$JCIdent.accept(JCTree.java:2011)
      at com.sun.tools.javac.tree.TreeScanner.scan(TreeScanner.java:49)
      at com.sun.tools.javac.comp.Flow$BaseAnalyzer.scan(Flow.java:404)
      at com.sun.tools.javac.comp.Flow$AssignAnalyzer.scan(Flow.java:1382)
      at com.sun.tools.javac.comp.Flow$AssignAnalyzer.scanExpr(Flow.java:1635)
      at com.sun.tools.javac.comp.Flow$AssignAnalyzer.scanExprs(Flow.java:1647)
      at com.sun.tools.javac.comp.Flow$AssignAnalyzer.visitNewClass(Flow.java:2264)
      at com.sun.tools.javac.tree.JCTree$JCNewClass.accept(JCTree.java:1516)
      at com.sun.tools.javac.tree.TreeScanner.scan(TreeScanner.java:49)
      at com.sun.tools.javac.comp.Flow$BaseAnalyzer.scan(Flow.java:404)
      at com.sun.tools.javac.comp.Flow$AssignAnalyzer.scan(Flow.java:1382)
      at com.sun.tools.javac.comp.Flow$AssignAnalyzer.scanExpr(Flow.java:1635)
      at com.sun.tools.javac.comp.Flow$AssignAnalyzer.scanExprs(Flow.java:1647)
      at com.sun.tools.javac.comp.Flow$AssignAnalyzer.visitApply(Flow.java:2259)
      at com.sun.tools.javac.tree.JCTree$JCMethodInvocation.accept(JCTree.java:1465)
      at com.sun.tools.javac.tree.TreeScanner.scan(TreeScanner.java:49)
      at com.sun.tools.javac.comp.Flow$BaseAnalyzer.scan(Flow.java:404)
      at com.sun.tools.javac.comp.Flow$AssignAnalyzer.scan(Flow.java:1382)
      at com.sun.tools.javac.tree.TreeScanner.visitExec(TreeScanner.java:175)
      at com.sun.tools.javac.tree.JCTree$JCExpressionStatement.accept(JCTree.java:1296)
      at com.sun.tools.javac.tree.TreeScanner.scan(TreeScanner.java:49)
      at com.sun.tools.javac.comp.Flow$BaseAnalyzer.scan(Flow.java:404)
      at com.sun.tools.javac.comp.Flow$AssignAnalyzer.scan(Flow.java:1382)
      at com.sun.tools.javac.tree.TreeScanner.scan(TreeScanner.java:57)
      at com.sun.tools.javac.comp.Flow$AssignAnalyzer.visitBlock(Flow.java:1883)
      at com.sun.tools.javac.tree.JCTree$JCBlock.accept(JCTree.java:909)
      at com.sun.tools.javac.tree.TreeScanner.scan(TreeScanner.java:49)
      at com.sun.tools.javac.comp.Flow$BaseAnalyzer.scan(Flow.java:404)
      at com.sun.tools.javac.comp.Flow$AssignAnalyzer.scan(Flow.java:1382)
      at com.sun.tools.javac.comp.Flow$AssignAnalyzer.visitMethodDef(Flow.java:1811)
      at com.sun.tools.javac.tree.JCTree$JCMethodDecl.accept(JCTree.java:778)
      at com.sun.tools.javac.tree.TreeScanner.scan(TreeScanner.java:49)
      at com.sun.tools.javac.comp.Flow$BaseAnalyzer.scan(Flow.java:404)
      at com.sun.tools.javac.comp.Flow$AssignAnalyzer.scan(Flow.java:1382)
      at com.sun.tools.javac.comp.Flow$AssignAnalyzer.visitClassDef(Flow.java:1749)
      at com.sun.tools.javac.tree.JCTree$JCClassDecl.accept(JCTree.java:693)
      at com.sun.tools.javac.tree.TreeScanner.scan(TreeScanner.java:49)
      at com.sun.tools.javac.comp.Flow$BaseAnalyzer.scan(Flow.java:404)
      at com.sun.tools.javac.comp.Flow$AssignAnalyzer.scan(Flow.java:1382)
      at com.sun.tools.javac.comp.Flow$AssignAnalyzer.analyzeTree(Flow.java:2446)
      at com.sun.tools.javac.comp.Flow$AssignAnalyzer.analyzeTree(Flow.java:2429)
      at com.sun.tools.javac.comp.Flow.analyzeTree(Flow.java:211)
      at com.sun.tools.javac.main.JavaCompiler.flow(JavaCompiler.java:1327)
      at com.sun.tools.javac.main.JavaCompiler.flow(JavaCompiler.java:1296)
      at com.sun.tools.javac.main.JavaCompiler.compile2(JavaCompiler.java:901)
      at com.sun.tools.javac.main.JavaCompiler.compile(JavaCompiler.java:860)
      at com.sun.tools.javac.main.Main.compile(Main.java:523)
      at com.sun.tools.javac.main.Main.compile(Main.java:381)
      at com.sun.tools.javac.main.Main.compile(Main.java:370)
      at com.sun.tools.javac.main.Main.compile(Main.java:361)
      at com.sun.tools.javac.Main.compile(Main.java:74)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      at java.lang.reflect.Method.invoke(Method.java:497)
      at org.codehaus.plexus.compiler.javac.JavacCompiler.compileInProcess(JavacCompiler.java:420)
      at org.codehaus.plexus.compiler.javac.JavacCompiler.compile(JavacCompiler.java:141)
      at org.apache.maven.plugin.AbstractCompilerMojo.execute(AbstractCompilerMojo.java:493)
      at org.apache.maven.plugin.CompilerMojo.execute(CompilerMojo.java:114)
      at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:101)
      at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:209)
      at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153)
      at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145)
      at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:84)
      at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:59)
      at org.apache.maven.lifecycle.internal.LifecycleStarter.singleThreadedBuild(LifecycleStarter.java:183)
      at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:161)
      at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:320)
      at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:156)
      at org.apache.maven.cli.MavenCli.execute(MavenCli.java:537)
      at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:196)
      at org.apache.maven.cli.MavenCli.main(MavenCli.java:141)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      at java.lang.reflect.Method.invoke(Method.java:497)
      at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:290)
      at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:230)
      at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:409)
      at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:352)
      -> [Help 1]


      REPRODUCIBILITY :
      This bug can be reproduced always.

      ---------- BEGIN SOURCE ----------
      package test.component;
      public final class CompilationBug {

          public <V extends java.io.Serializable> CompilationBug(V value) {
              this("", new AModel<>(xxx));
          }

          public CompilationBug(AModel value) {
          }

          private class AModel<T> {
              public AModel(T value) {
              }
          }
      }
      ---------- END SOURCE ----------

      CUSTOMER SUBMITTED WORKAROUND :
      Replace the 'xxx' argument name by the 'value'.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                fmatte Fairoz Matte
                Reporter:
                webbuggrp Webbug Group
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: