src/share/classes/com/sun/tools/javac/processing/JavacProcessingEnvironment.java

changeset 1159
4261dc8af622
parent 1157
3809292620c9
child 1210
62e611704863
     1.1 --- a/src/share/classes/com/sun/tools/javac/processing/JavacProcessingEnvironment.java	Tue Dec 13 14:33:39 2011 -0800
     1.2 +++ b/src/share/classes/com/sun/tools/javac/processing/JavacProcessingEnvironment.java	Wed Dec 14 16:16:04 2011 -0800
     1.3 @@ -1033,12 +1033,10 @@
     1.4              Assert.checkNonNull(options);
     1.5              next.put(Options.optionsKey, options);
     1.6  
     1.7 -            PrintWriter out = context.get(Log.outKey);
     1.8 -            Assert.checkNonNull(out);
     1.9 -            next.put(Log.outKey, out);
    1.10              Locale locale = context.get(Locale.class);
    1.11              if (locale != null)
    1.12                  next.put(Locale.class, locale);
    1.13 +
    1.14              Assert.checkNonNull(messages);
    1.15              next.put(JavacMessages.messagesKey, messages);
    1.16  
    1.17 @@ -1076,6 +1074,9 @@
    1.18              Assert.checkNonNull(tokens);
    1.19              next.put(Tokens.tokensKey, tokens);
    1.20  
    1.21 +            // propogate the log's writers directly, instead of going through context
    1.22 +            Log.instance(next).setWriters(log);
    1.23 +
    1.24              JavaCompiler oldCompiler = JavaCompiler.instance(context);
    1.25              JavaCompiler nextCompiler = JavaCompiler.instance(next);
    1.26              nextCompiler.initRound(oldCompiler);
    1.27 @@ -1472,14 +1473,6 @@
    1.28          return context;
    1.29      }
    1.30  
    1.31 -    /**
    1.32 -     * Internal use method to return the writer being used by the
    1.33 -     * processing environment.
    1.34 -     */
    1.35 -    public PrintWriter getWriter() {
    1.36 -        return context.get(Log.outKey);
    1.37 -    }
    1.38 -
    1.39      public String toString() {
    1.40          return "javac ProcessingEnvironment";
    1.41      }

mercurial