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

Print this page

        

@@ -37,11 +37,11 @@
  */
 @Deprecated
 public class LogStream extends PrintStream {
 
     /** table mapping known log names to log stream objects */
-    private static Hashtable    known = new Hashtable(5);
+    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,11 +88,11 @@
      */
     @Deprecated
     public static LogStream log(String name) {
         LogStream stream;
         synchronized (known) {
-            stream = (LogStream)known.get(name);
+            stream = known.get(name);
             if (stream == null) {
                 stream = new LogStream(name, defaultStream);
             }
             known.put(name, stream);
         }