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

JavaCompiler.getStandardFileManager always uses default charset not the one that user specifies

XMLWordPrintable

    • b138
    • generic
    • generic
    • Verified

      JavaCompiler.getStandardFileManager(...,Locale,...) always uses default locale and ignores the one that user specifies.


      <JavacTool.java>
      .
      .
      .
      public JavacFileManager getStandardFileManager(
              DiagnosticListener<? super JavaFileObject> diagnosticListener,
              Locale locale,
              Charset charset) {
              Context context = new Context();
              if (diagnosticListener != null)
                  context.put(DiagnosticListener.class, diagnosticListener);
              context.put(Log.outKey, new PrintWriter(System.err, true)); // FIXME
              return new JavacFileManager(context, true, charset);
      }
      ...
      .

      </JavacTool.java>

      In the above Standard implementaion, locale is ignored.

            jjg Jonathan Gibbons
            savadhansunw Seetharama Avadhanam (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: