2004-02-11 Michael Koch <konqueror@gmx.de>
* java/net/DatagramSocket.java (setReuseAddress): Use Boolean.valueOf() instead of creating a new Boolean object. (setBroadcast): Likewise. * java/net/MulticastSocket.java (setLoopbackMode): Likewise. * java/net/ServerSocket.java (setReuseAddress): Likewise. * java/net/Socket.java (setTcpNoDelay): Likewise. (setSoLinger): Likewise. (setOOBInline): Likewise. (setKeepAlive): Likewise. (setReuseAddress): Likewise. * java/net/URLConnection.java (setContentHandler): Replace == with equals(). * java/net/URLStreamHandler.java (hostSEquals): Fix checking host addresses. (toExternalForm): Dont check protocol for null. We know already its not null. From-SVN: r77670
This commit is contained in:
parent
e193b4082e
commit
31d25d83b6
7 changed files with 35 additions and 12 deletions
|
@ -657,7 +657,7 @@ public class Socket
|
|||
if (isClosed())
|
||||
throw new SocketException("socket is closed");
|
||||
|
||||
getImpl().setOption(SocketOptions.TCP_NODELAY, new Boolean(on));
|
||||
getImpl().setOption(SocketOptions.TCP_NODELAY, Boolean.valueOf(on));
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -719,7 +719,7 @@ public class Socket
|
|||
}
|
||||
else
|
||||
{
|
||||
getImpl().setOption(SocketOptions.SO_LINGER, new Boolean(false));
|
||||
getImpl().setOption(SocketOptions.SO_LINGER, Boolean.valueOf(false));
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -784,7 +784,7 @@ public class Socket
|
|||
if (isClosed())
|
||||
throw new SocketException("socket is closed");
|
||||
|
||||
getImpl().setOption(SocketOptions.SO_OOBINLINE, new Boolean(on));
|
||||
getImpl().setOption(SocketOptions.SO_OOBINLINE, Boolean.valueOf(on));
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -975,7 +975,7 @@ public class Socket
|
|||
if (isClosed())
|
||||
throw new SocketException("socket is closed");
|
||||
|
||||
getImpl().setOption(SocketOptions.SO_KEEPALIVE, new Boolean(on));
|
||||
getImpl().setOption(SocketOptions.SO_KEEPALIVE, Boolean.valueOf(on));
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -1150,7 +1150,7 @@ public class Socket
|
|||
*/
|
||||
public void setReuseAddress (boolean on) throws SocketException
|
||||
{
|
||||
getImpl().setOption (SocketOptions.SO_REUSEADDR, new Boolean (on));
|
||||
getImpl().setOption (SocketOptions.SO_REUSEADDR, Boolean.valueOf(on));
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue