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

tools.jar bug with sun.tools.native2ascii.Main

XMLWordPrintable


      A bug is reported against sun.tools.native2ascii.Main.convert() in tools.jar
      when ojserver/ojdeploy are used in JDeveloper. If multiple deployments are
      run on the same folder, using the ojdeploy tool with the -clean and -ojserver
      options without restarting ojserver, ojserver will sometimes fail with the
      error "Unable to delete ...\\classes\\...\\JDev1141116155786355741.properties".

      The problem is with lines 158-172 in the code, showing that a BufferedReader
      in and a BufferedWriter out are declared, and BufferedWriter is closed.
      However, BufferedReader remains open.

                  } else {
                   //N2A
                      String inLine;
                      BufferedReader in = getN2AInput(inputFileName);
                      BufferedWriter out = getN2AOutput(outputFileName);

                      while ((inLine = in.readLine()) != null) {
                          out.write(inLine.toCharArray());
                          out.write(lineBreak);
                          if (outputFileName == null) { // flush stdout
                              out.flush();
                          }
                      }
                      out.close();
                  }

            igerasim Ivan Gerasimov
            shadowbug Shadow Bug
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: