8267187: Remove deprecated constructor for Log

Reviewed-by: darcy, iris
This commit is contained in:
Jonathan Gibbons 2021-06-08 02:16:56 +00:00
parent fc08af58cb
commit 36c4e5f264

View File

@ -310,39 +310,6 @@ public class Log extends AbstractLog {
return writers;
}
/**
* Construct a log with given I/O redirections.
* @deprecated
* This constructor is provided to support
* jdk.javadoc.internal.tool.Messager.Messager(com.sun.tools.javac.util.Context,
* java.lang.String, java.io.PrintWriter, java.io.PrintWriter)
*/
@Deprecated
protected Log(Context context, PrintWriter errWriter, PrintWriter warnWriter, PrintWriter noticeWriter) {
this(context, initWriters(errWriter, warnWriter, noticeWriter));
}
/**
* Initialize a writer map with different streams for different types of diagnostics.
* @param errWriter a stream for writing error messages
* @param warnWriter a stream for writing warning messages
* @param noticeWriter a stream for writing notice messages
* @return a map of writers
* @deprecated This method exists to support a supported but now deprecated javadoc entry point.
*/
@Deprecated
private static Map<WriterKind, PrintWriter> initWriters(PrintWriter errWriter, PrintWriter warnWriter, PrintWriter noticeWriter) {
Map<WriterKind, PrintWriter> writers = new EnumMap<>(WriterKind.class);
writers.put(WriterKind.ERROR, errWriter);
writers.put(WriterKind.WARNING, warnWriter);
writers.put(WriterKind.NOTICE, noticeWriter);
writers.put(WriterKind.STDOUT, noticeWriter);
writers.put(WriterKind.STDERR, errWriter);
return writers;
}
/**
* Creates a log.
* @param context the context in which the log should be registered
@ -773,7 +740,6 @@ public class Log extends AbstractLog {
writer.flush();
}
@Deprecated
protected PrintWriter getWriterForDiagnosticType(DiagnosticType dt) {
switch (dt) {
case FRAGMENT: