2003-10-29 Michael Koch <konqueror@gmx.de>
* java/net/InetAddress.java (equals): Remove redundant obj == null check. * java/net/SocketPermission.java (equals): Likewise. * java/net/URL.java (equals): Likewise. (getURLStreamHandler): Likewise. From-SVN: r73034
This commit is contained in:
committed by
Michael Koch
parent
1d749ee003
commit
9c9081ae91
@@ -476,8 +476,7 @@ public class InetAddress implements Serializable
|
||||
*/
|
||||
public boolean equals (Object obj)
|
||||
{
|
||||
if (obj == null
|
||||
|| ! (obj instanceof InetAddress))
|
||||
if (! (obj instanceof InetAddress))
|
||||
return false;
|
||||
|
||||
// "The Java Class Libraries" 2nd edition says "If a machine has
|
||||
|
||||
@@ -147,9 +147,6 @@ public final class SocketPermission extends Permission
|
||||
*/
|
||||
public boolean equals(Object obj)
|
||||
{
|
||||
if (obj == null)
|
||||
return (false);
|
||||
|
||||
if (!(obj instanceof SocketPermission))
|
||||
return (false);
|
||||
|
||||
|
||||
@@ -451,7 +451,7 @@ public final class URL implements Serializable
|
||||
*/
|
||||
public boolean equals (Object obj)
|
||||
{
|
||||
if (obj == null || ! (obj instanceof URL))
|
||||
if (! (obj instanceof URL))
|
||||
return false;
|
||||
|
||||
return ph.equals (this, (URL) obj);
|
||||
@@ -829,8 +829,7 @@ public final class URL implements Serializable
|
||||
// Can't instantiate; handler still null, go on to next element.
|
||||
}
|
||||
}
|
||||
while ((ph == null ||
|
||||
!(ph instanceof URLStreamHandler))
|
||||
while ((! (ph instanceof URLStreamHandler))
|
||||
&& pkgPrefix.hasMoreTokens());
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user