Commit 9c9081ae by Michael Koch Committed by Michael Koch

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
parent 1d749ee0
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.
2003-10-29 Michael Koch <konqueror@gmx.de>
* gnu/java/net/natPlainDatagramSocketImplPosix.cc
(setOption): Directly return if no error occured.
* gnu/java/net/natPlainSocketImplPosix.cc
......
......@@ -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());
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment