< prev index next >

## src/com/sun/javatest/agent/SocketConnection.java

Print this page

    @@ -182,11 +182,11 @@
                 }
             }
         }

         private static String getHostName(InetAddress addr) {
    -        String s = (String) (addressCache.get(addr));
    +        String s = addressCache.get(addr);
             if (s == null) {
                 s = addr.getHostName();
                 addressCache.put(addr, s);
             }
             return s;

    @@ -236,7 +236,7 @@
         private final OutputStream socketOutput;
         private String name;
         private boolean closed;
         private Thread waitThread;
         private static Timer timer = new Timer();
    -    private static Hashtable addressCache = new Hashtable();
    +    private static Hashtable<InetAddress, String> addressCache = new Hashtable<>();
     }

< prev index next >