improve fatal error handling in JavaCompiler

XMLWordPrintable

    • Type: Enhancement
    • Resolution: Fixed
    • Priority: P4
    • 17
    • Affects Version/s: None
    • Component/s: tools
    • None
    • b04

      See the following code in JavaCompiler:


                  for (Closeable c: closeables) {
                      try {
                          c.close();
                      } catch (IOException e) {
                          // When javac uses JDK 7 as a baseline, this code would be
                          // better written to set any/all exceptions from all the
                          // Closeables as suppressed exceptions on the FatalError
                          // that is thrown.
                          JCDiagnostic msg = diagFactory.fragment("fatal.err.cant.close");
                          throw new FatalError(msg, e);
                      }
                  }

            Assignee:
            Jonathan Gibbons
            Reporter:
            Jonathan Gibbons
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: