--- old/src/share/classes/sun/rmi/transport/tcp/ConnectionMultiplexer.java Tue Feb 21 21:28:29 2012 +++ new/src/share/classes/sun/rmi/transport/tcp/ConnectionMultiplexer.java Tue Feb 21 21:28:27 2012 @@ -85,7 +85,7 @@ private DataOutputStream dataOut; /** table holding currently open connection IDs and related info */ - private Hashtable connectionTable = new Hashtable(7); + private Hashtable connectionTable = new Hashtable<>(7); /** number of currently open connections */ private int numConnections = 0; @@ -149,8 +149,7 @@ } idObj = new Integer(id); - info = - (MultiplexConnectionInfo) connectionTable.get(idObj); + info = connectionTable.get(idObj); if (info != null) throw new IOException( "OPEN: Connection ID already exists"); @@ -175,8 +174,7 @@ } idObj = new Integer(id); - info = - (MultiplexConnectionInfo) connectionTable.get(idObj); + info = connectionTable.get(idObj); if (info == null) throw new IOException( "CLOSE: Invalid connection ID"); @@ -200,8 +198,7 @@ } idObj = new Integer(id); - info = - (MultiplexConnectionInfo) connectionTable.get(idObj); + info = connectionTable.get(idObj); if (info == null) throw new IOException( "CLOSEACK: Invalid connection ID"); @@ -220,8 +217,7 @@ case REQUEST: id = dataIn.readUnsignedShort(); idObj = new Integer(id); - info = - (MultiplexConnectionInfo) connectionTable.get(idObj); + info = connectionTable.get(idObj); if (info == null) throw new IOException( "REQUEST: Invalid connection ID"); @@ -239,8 +235,7 @@ case TRANSMIT: id = dataIn.readUnsignedShort(); idObj = new Integer(id); - info = - (MultiplexConnectionInfo) connectionTable.get(idObj); + info = connectionTable.get(idObj); if (info == null) throw new IOException("SEND: Invalid connection ID"); length = dataIn.readInt(); @@ -331,10 +326,10 @@ return; alive = false; - Enumeration enum_ = connectionTable.elements(); + Enumeration enum_ = + connectionTable.elements(); while (enum_.hasMoreElements()) { - MultiplexConnectionInfo info = - (MultiplexConnectionInfo) enum_.nextElement(); + MultiplexConnectionInfo info = enum_.nextElement(); info.in.disconnect(); info.out.disconnect(); }