--- old/src/share/classes/sun/rmi/transport/tcp/TCPEndpoint.java Tue Feb 21 21:28:40 2012 +++ new/src/share/classes/sun/rmi/transport/tcp/TCPEndpoint.java Tue Feb 21 21:28:38 2012 @@ -148,7 +148,7 @@ // TBD: should this be a weak hash table? private static final Map> localEndpoints = - new HashMap>(); + new HashMap<>(); /** * Create an endpoint for a specified host and port. @@ -623,11 +623,10 @@ try { TCPEndpoint.shedConnectionCaches(); // REMIND: should we retry createSocket? - } catch (OutOfMemoryError mem) { + } catch (OutOfMemoryError | Exception mem) { // don't quit if out of memory - } catch (Exception ex) { - // don't quit if shed fails non-catastrophically - } + // or shed fails non-catastrophically + } throw new ConnectIOException("Exception creating connection to: " + host, e);