+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
public boolean
equals(Object obj)
{
- if (obj == null)
- return(false);
-
if (!(obj instanceof Font))
return(false);
public boolean
equals(Object obj)
{
- if (obj == null)
- return(false);
-
if (!(obj instanceof DataFlavor))
return(false);
/* 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);
}
*/
public boolean equals (Object obj)
{
- if (obj == null || ! (obj instanceof InetAddress))
+ if (! (obj instanceof InetAddress))
return false;
byte[] addr1 = addr;
*/
public boolean equals (Object obj)
{
- if (obj == null || ! (obj instanceof Inet6Address))
+ if (! (obj instanceof Inet6Address))
return false;
Inet6Address tmp = (Inet6Address) obj;
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
*/
public boolean equals (Object theOther)
{
- if (theOther != null
- && theOther instanceof CacheKey)
+ if (theOther instanceof CacheKey)
{
CacheKey key = (CacheKey) theOther;
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);
*/
public boolean equals(Object obj)
{
- if (obj == null)
- return false;
-
if (!(obj instanceof Timestamp))
return false;
*/
public boolean equals(Object o)
{
- if (o == null)
- return false;
-
if (!super.equals(o))
return false;
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 ());