src/share/classes/java/rmi/server/LogStream.java

Print this page

        

*** 37,47 **** */ @Deprecated public class LogStream extends PrintStream { /** table mapping known log names to log stream objects */ ! private static Hashtable known = new Hashtable(5); /** default output stream for new logs */ private static PrintStream defaultStream = System.err; /** log name for this log */ private String name; --- 37,47 ---- */ @Deprecated public class LogStream extends PrintStream { /** table mapping known log names to log stream objects */ ! private static Map<String,LogStream> known = new HashMap<>(5); /** default output stream for new logs */ private static PrintStream defaultStream = System.err; /** log name for this log */ private String name;
*** 88,98 **** */ @Deprecated public static LogStream log(String name) { LogStream stream; synchronized (known) { ! stream = (LogStream)known.get(name); if (stream == null) { stream = new LogStream(name, defaultStream); } known.put(name, stream); } --- 88,98 ---- */ @Deprecated public static LogStream log(String name) { LogStream stream; synchronized (known) { ! stream = known.get(name); if (stream == null) { stream = new LogStream(name, defaultStream); } known.put(name, stream); }