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

Compiler should handle java.nio.file.FileSystemNotFoundException gracefully and not abort

XMLWordPrintable

    • b120
    • generic
    • generic
    • Verified

      $ cat X.java
      package p;
      interface Extra { }

      $ ~/openjdk/dev/build/linux-x86_64-normal-server-release/jdk/bin/javac -modulepath dummy.jar X.java
      An exception has occurred in the compiler (9-internal). Please file a bug against the Java compiler via the Java bug reporting page (http://bugreport.java.com) after checking the Bug Database (http://bugs.java.com) for duplicates. Include your program and the following diagnostic in your report. Thank you.
      java.nio.file.FileSystemNotFoundException: dummy.jar
      at jdk.nio.zipfs.ZipFileSystem.<init>(jdk.zipfs/ZipFileSystem.java:109)
      at jdk.nio.zipfs.ZipFileSystemProvider.newFileSystem(jdk.zipfs/ZipFileSystemProvider.java:136)
      at java.nio.file.FileSystems.newFileSystem(java.base/FileSystems.java:411)
      at com.sun.tools.javac.file.Locations$ModulePathLocationHandler$ModulePathIterator.inferModuleName(jdk.compiler/Locations.java:1073)
      at com.sun.tools.javac.file.Locations$ModulePathLocationHandler$ModulePathIterator.scanFile(jdk.compiler/Locations.java:1048)
      at com.sun.tools.javac.file.Locations$ModulePathLocationHandler$ModulePathIterator.hasNext(jdk.compiler/Locations.java:971)
      at com.sun.tools.javac.code.ModuleFinder$ModuleLocationIterator.hasNext(jdk.compiler/ModuleFinder.java:122)
      at com.sun.tools.javac.code.ModuleFinder.scanModulePath(jdk.compiler/ModuleFinder.java:239)
      at com.sun.tools.javac.code.ModuleFinder.findAllModules(jdk.compiler/ModuleFinder.java:175)
      at com.sun.tools.javac.comp.Modules.getUnnamedModuleCompleter(jdk.compiler/Modules.java:921)
      at com.sun.tools.javac.comp.Modules.setCompilationUnitModules(jdk.compiler/Modules.java:355)
      at com.sun.tools.javac.comp.Modules.enter(jdk.compiler/Modules.java:205)
      at com.sun.tools.javac.main.JavaCompiler.initModules(jdk.compiler/JavaCompiler.java:1020)
      at com.sun.tools.javac.main.JavaCompiler.initModules(jdk.compiler/JavaCompiler.java:1012)
      at com.sun.tools.javac.main.JavaCompiler.compile(jdk.compiler/JavaCompiler.java:906)
      at com.sun.tools.javac.main.Main.compile(jdk.compiler/Main.java:269)
      at com.sun.tools.javac.main.Main.compile(jdk.compiler/Main.java:144)
      at com.sun.tools.javac.Main.compile(jdk.compiler/Main.java:55)
      at com.sun.tools.javac.Main.main(jdk.compiler/Main.java:41)



            sadayapalam Srikanth Adayapalam (Inactive)
            sadayapalam Srikanth Adayapalam (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved: