[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Method.equals() question
From: |
Archie Cobbs |
Subject: |
Method.equals() question |
Date: |
Thu, 27 Feb 2003 18:03:01 -0800 (PST) |
Hi,
In classpath-0.05, Method.equals() is described this way:
/**
* Compare two objects to see if they are semantically equivalent.
* Two Methods are semantically equivalent if they have the same declaring
* class, name, and parameter list. This ignores different exception
* clauses or return types.
*
* @param o the object to compare to
* @return <code>true</code> if they are equal; <code>false</code> if not
*/
public boolean equals(Object o)
{
....
}
Howver, this contradicts the JDK 1.4 docs, which say that the method's
return type must also be equal:
http://java.sun.com/j2se/1.4/docs/api/java/lang/reflect/Method.html#equals(java.lang.Object)
Is this a classpath bug?
Thanks,
-Archie
__________________________________________________________________________
Archie Cobbs * Precision I/O * http://www.precisionio.com
- Method.equals() question,
Archie Cobbs <=
Re: Method.equals() question, Brian Jones, 2003/02/27