Font.java, [...]: Removed some redundant obj == null checks.
2003-11-11 Michael Koch <konqueror@gmx.de> * java/awt/Font.java, java/awt/datatransfer/DataFlavor.java, java/math/BigInteger.java, java/net/Inet4Address.java, java/net/Inet6Address.java, java/rmi/MarshalledObject.java, java/rmi/server/RMIClassLoader.java, java/security/cert/CertStore.java, java/sql/Timestamp.java, java/text/SimpleDateFormat.java, javax/naming/CompoundName.java: Removed some redundant obj == null checks. From-SVN: r73448
This commit is contained in:
parent
c824ce21ca
commit
5237cd77c2
12 changed files with 22 additions and 21 deletions
|
@ -1,3 +1,18 @@
|
|||
2003-11-11 Michael Koch <konqueror@gmx.de>
|
||||
|
||||
* java/awt/Font.java,
|
||||
java/awt/datatransfer/DataFlavor.java,
|
||||
java/math/BigInteger.java,
|
||||
java/net/Inet4Address.java,
|
||||
java/net/Inet6Address.java,
|
||||
java/rmi/MarshalledObject.java,
|
||||
java/rmi/server/RMIClassLoader.java,
|
||||
java/security/cert/CertStore.java,
|
||||
java/sql/Timestamp.java,
|
||||
java/text/SimpleDateFormat.java,
|
||||
javax/naming/CompoundName.java:
|
||||
Removed some redundant obj == null checks.
|
||||
|
||||
2003-11-11 Michael Koch <konqueror@gmx.de>
|
||||
|
||||
* java/nio/ByteBuffer.java
|
||||
|
|
|
@ -1226,9 +1226,6 @@ hashCode()
|
|||
public boolean
|
||||
equals(Object obj)
|
||||
{
|
||||
if (obj == null)
|
||||
return(false);
|
||||
|
||||
if (!(obj instanceof Font))
|
||||
return(false);
|
||||
|
||||
|
|
|
@ -723,9 +723,6 @@ equals(DataFlavor flavor)
|
|||
public boolean
|
||||
equals(Object obj)
|
||||
{
|
||||
if (obj == null)
|
||||
return(false);
|
||||
|
||||
if (!(obj instanceof DataFlavor))
|
||||
return(false);
|
||||
|
||||
|
|
|
@ -1565,7 +1565,7 @@ public class BigInteger extends Number implements Comparable
|
|||
/* Assumes this and obj are both canonicalized. */
|
||||
public boolean equals(Object obj)
|
||||
{
|
||||
if (obj == null || ! (obj instanceof BigInteger))
|
||||
if (! (obj instanceof BigInteger))
|
||||
return false;
|
||||
return equals(this, (BigInteger) obj);
|
||||
}
|
||||
|
|
|
@ -258,7 +258,7 @@ public final class Inet4Address extends InetAddress
|
|||
*/
|
||||
public boolean equals (Object obj)
|
||||
{
|
||||
if (obj == null || ! (obj instanceof InetAddress))
|
||||
if (! (obj instanceof InetAddress))
|
||||
return false;
|
||||
|
||||
byte[] addr1 = addr;
|
||||
|
|
|
@ -243,7 +243,7 @@ public final class Inet6Address extends InetAddress
|
|||
*/
|
||||
public boolean equals (Object obj)
|
||||
{
|
||||
if (obj == null || ! (obj instanceof Inet6Address))
|
||||
if (! (obj instanceof Inet6Address))
|
||||
return false;
|
||||
|
||||
Inet6Address tmp = (Inet6Address) obj;
|
||||
|
|
|
@ -76,7 +76,7 @@ public final class MarshalledObject
|
|||
|
||||
public boolean equals(Object obj)
|
||||
{
|
||||
if(obj == null || !(obj instanceof MarshalledObject) )
|
||||
if (! (obj instanceof MarshalledObject))
|
||||
return false;
|
||||
|
||||
// hashCode even differs, don't do the time-consuming comparisons
|
||||
|
|
|
@ -113,8 +113,7 @@ public class RMIClassLoader
|
|||
*/
|
||||
public boolean equals (Object theOther)
|
||||
{
|
||||
if (theOther != null
|
||||
&& theOther instanceof CacheKey)
|
||||
if (theOther instanceof CacheKey)
|
||||
{
|
||||
CacheKey key = (CacheKey) theOther;
|
||||
|
||||
|
|
|
@ -215,8 +215,7 @@ public class CertStore
|
|||
catch (java.lang.reflect.InvocationTargetException ite)
|
||||
{
|
||||
Throwable cause = ite.getCause();
|
||||
if (cause != null &&
|
||||
(cause instanceof InvalidAlgorithmParameterException))
|
||||
if (cause instanceof InvalidAlgorithmParameterException)
|
||||
throw (InvalidAlgorithmParameterException) cause;
|
||||
else
|
||||
throw new NoSuchAlgorithmException(type);
|
||||
|
|
|
@ -224,9 +224,6 @@ public class Timestamp extends java.util.Date
|
|||
*/
|
||||
public boolean equals(Object obj)
|
||||
{
|
||||
if (obj == null)
|
||||
return false;
|
||||
|
||||
if (!(obj instanceof Timestamp))
|
||||
return false;
|
||||
|
||||
|
|
|
@ -374,9 +374,6 @@ public class SimpleDateFormat extends DateFormat
|
|||
*/
|
||||
public boolean equals(Object o)
|
||||
{
|
||||
if (o == null)
|
||||
return false;
|
||||
|
||||
if (!super.equals(o))
|
||||
return false;
|
||||
|
||||
|
|
|
@ -240,7 +240,7 @@ public class CompoundName implements Name, Cloneable, Serializable
|
|||
|
||||
public int compareTo (Object obj)
|
||||
{
|
||||
if (obj == null || ! (obj instanceof CompoundName))
|
||||
if (! (obj instanceof CompoundName))
|
||||
throw new ClassCastException ("CompoundName.compareTo() expected CompoundName");
|
||||
CompoundName cn = (CompoundName) obj;
|
||||
int last = Math.min (cn.elts.size (), elts.size ());
|
||||
|
|
Loading…
Add table
Reference in a new issue