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
|
@ -415,7 +415,7 @@ public abstract class URLStreamHandler
|
|||
InetAddress addr1 = getHostAddress (url1);
|
||||
InetAddress addr2 = getHostAddress (url2);
|
||||
|
||||
if (addr1 != null || addr2 != null)
|
||||
if (addr1 != null && addr2 != null)
|
||||
return addr1.equals (addr2);
|
||||
|
||||
String host1 = url1.getHost();
|
||||
|
@ -511,7 +511,7 @@ public abstract class URLStreamHandler
|
|||
int size = protocol.length() + host.length() + file.length() + 24;
|
||||
StringBuffer sb = new StringBuffer(size);
|
||||
|
||||
if (protocol != null && protocol.length() > 0)
|
||||
if (protocol.length() != 0)
|
||||
{
|
||||
sb.append(protocol);
|
||||
sb.append(":");
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue