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

javac MethodSymbol throws NPE if ClassReader does not read parameter names correctly

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P3 P3
    • 7
    • 6u31, 7
    • tools
    • None
    • b75
    • generic, x86
    • generic, windows_7
    • Verified

        When core classes are built for debug (-g flag) javah throws an unexpected
        java.lang.NullPointerException while working in jdk/make/java/nio:

        An exception has occurred in the compiler (1.7.0-tbell_2009_10_05.23.59.01_bootstrap). Please file a bug at the Java Developer Connection (http://java.sun.com/webapps/bugreport) after checking the Bug Parade for duplicates. Include your program and the following diagnostic in your report. Thank you.
        java.lang.NullPointerException
                at com.sun.tools.javac.code.Symbol$MethodSymbol.params(Symbol.java:1226)
                at com.sun.tools.javac.code.Symbol$MethodSymbol.getParameters(Symbol.java:1252)
                at com.sun.tools.javac.code.Symbol$MethodSymbol.getParameters(Symbol.java:1014)
                at javax.lang.model.util.ElementScanner6.visitExecutable(ElementScanner6.java:191)
                at com.sun.tools.javac.code.Symbol$MethodSymbol.accept(Symbol.java:1260)
                at javax.lang.model.util.ElementScanner6.scan(ElementScanner6.java:139)
                at com.sun.tools.javac.processing.JavacProcessingEnvironment$ComputeAnnotationSet.scan(JavacProcessingEnvironment.java:767)
                at com.sun.tools.javac.processing.JavacProcessingEnvironment$ComputeAnnotationSet.scan(JavacProcessingEnvironment.java:745)
                at javax.lang.model.util.ElementScanner6.scan(ElementScanner6.java:129)
                at javax.lang.model.util.ElementScanner6.visitType(ElementScanner6.java:169)
                at com.sun.tools.javac.code.Symbol$ClassSymbol.accept(Symbol.java:874)
                at javax.lang.model.util.ElementScanner6.scan(ElementScanner6.java:139)
                at com.sun.tools.javac.processing.JavacProcessingEnvironment$ComputeAnnotationSet.scan(JavacProcessingEnvironment.java:767)
                at com.sun.tools.javac.processing.JavacProcessingEnvironment$ComputeAnnotationSet.scan(JavacProcessingEnvironment.java:745)
                at javax.lang.model.util.ElementScanner6.scan(ElementScanner6.java:129)
                at javax.lang.model.util.ElementScanner6.visitType(ElementScanner6.java:169)
                at com.sun.tools.javac.code.Symbol$ClassSymbol.accept(Symbol.java:874)
                at javax.lang.model.util.ElementScanner6.scan(ElementScanner6.java:139)
                at com.sun.tools.javac.processing.JavacProcessingEnvironment$ComputeAnnotationSet.scan(JavacProcessingEnvironment.java:767)
                at com.sun.tools.javac.processing.JavacProcessingEnvironment.doProcessing(JavacProcessingEnvironment.java:825)
                at com.sun.tools.javac.main.JavaCompiler.processAnnotations(JavaCompiler.java:1070)
                at com.sun.tools.javac.main.JavaCompiler.compile(JavaCompiler.java:805)
                at com.sun.tools.javac.main.Main.compile(Main.java:400)
                at com.sun.tools.javac.api.JavacTaskImpl.call(JavacTaskImpl.java:139)
                at com.sun.tools.javah.JavahTask.run(JavahTask.java:482)
                at com.sun.tools.javah.JavahTask.run(JavahTask.java:319)
                at com.sun.tools.javah.Main.main(Main.java:46)


        Bug-ID 6888888 is the short term workaround, which is to use the bootstrap javah instead.

        This bug report is for the eventual fix.

              jjg Jonathan Gibbons
              tbell Tim Bell
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Created:
                Updated:
                Resolved:
                Imported:
                Indexed: