8154493: AppletViewer should emit its deprecation warning to standard error
Reviewed-by: smarks
This commit is contained in:
parent
5dda2fc113
commit
1f092412dc
@ -104,7 +104,8 @@ public class Main {
|
||||
private int run(String [] args) {
|
||||
// DECODE ARGS
|
||||
try {
|
||||
System.out.println(lookup("deprecated"));
|
||||
System.err.println(lookup("deprecated"));
|
||||
System.err.flush();
|
||||
if (args.length == 0) {
|
||||
usage();
|
||||
return 0;
|
||||
|
@ -35,14 +35,14 @@ public final class DeprecatedAppletViewer {
|
||||
private static final String TEXT = "AppletViewer is deprecated.";
|
||||
|
||||
public static void main(final String[] args) {
|
||||
final PrintStream old = System.out;
|
||||
final PrintStream old = System.err;
|
||||
final ByteArrayOutputStream baos = new ByteArrayOutputStream(1000);
|
||||
final PrintStream ps = new PrintStream(baos);
|
||||
try {
|
||||
System.setOut(ps);
|
||||
System.setErr(ps);
|
||||
sun.applet.Main.main(new String[]{});
|
||||
} finally {
|
||||
System.setOut(old);
|
||||
System.setErr(old);
|
||||
}
|
||||
|
||||
final String text = new String(baos.toByteArray());
|
||||
|
Loading…
Reference in New Issue
Block a user