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

Compiler throws NPE when classpath includes "/"

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Duplicate
    • Icon: P4 P4
    • None
    • 9
    • tools
    • 9
    • b108
    • generic
    • generic

      javac throw NPE when -cp includes "/"

       ~/bin/jdk1.9.0b90/bin/javac -cp "/" Test.java

      java.lang.NullPointerException
      at com.sun.tools.javac.file.JavacFileManager.listContainer(JavacFileManager.java:401)
      at com.sun.tools.javac.file.JavacFileManager.list(JavacFileManager.java:678)
      at com.sun.tools.javac.code.ClassFinder.scanUserPaths(ClassFinder.java:566)
      at com.sun.tools.javac.code.ClassFinder.fillIn(ClassFinder.java:513)
      at com.sun.tools.javac.code.ClassFinder.complete(ClassFinder.java:295)
      at com.sun.tools.javac.code.ClassFinder.access$000(ClassFinder.java:74)
      at com.sun.tools.javac.code.ClassFinder$1.complete(ClassFinder.java:166)
      at com.sun.tools.javac.code.Symbol.complete(Symbol.java:579)
      at com.sun.tools.javac.comp.Enter.visitTopLevel(Enter.java:299)
      at com.sun.tools.javac.tree.JCTree$JCCompilationUnit.accept(JCTree.java:509)
      at com.sun.tools.javac.comp.Enter.classEnter(Enter.java:255)
      at com.sun.tools.javac.comp.Enter.classEnter(Enter.java:270)
      at com.sun.tools.javac.comp.Enter.complete(Enter.java:483)
      at com.sun.tools.javac.comp.Enter.main(Enter.java:467)
      at com.sun.tools.javac.main.JavaCompiler.enterTrees(JavaCompiler.java:962)
      at com.sun.tools.javac.main.JavaCompiler.compile(JavaCompiler.java:839)
      at com.sun.tools.javac.main.Main.compile(Main.java:254)
      at com.sun.tools.javac.main.Main.compile(Main.java:142)
      at com.sun.tools.javac.Main.compile(Main.java:56)
      at com.sun.tools.javac.Main.main(Main.java:42)

            shinyafox Shinya Yoshida
            shinyafox Shinya Yoshida
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: