-
Bug
-
Resolution: Not an Issue
-
P4
-
6
-
generic
-
generic
The specification for javax.sound.midi.Sequencer.SyncMode.equals says:
--
public final boolean equals(Object obj)
Determines whether two objects are equal. Returns true if the objects are identical
Overrides:
equals in class Object
Parameters:
obj - the reference object with which to compare
Returns:
true if this object is the same as the obj argument, false otherwise
See Also:
Object.hashCode(), Hashtable
--
The description of the method does not give a univocal presentation about what objects are supposed to be equal. Let's consider the following pair of objects:
Sequencer.SyncMode sMode1 = new MySyncMode("one");
Sequencer.SyncMode sMode2 = new MySyncMode("one");
The present spec can not say definitely whether these 2 objects are equal. One can argue that the following statement answers the question:
--
Returns:
true if this object is the same as the obj argument, false otherwise
--
However "the same" can be treated in different ways. For example, see the "return" section for java.lang.Long:
--
Returns:
true if the objects are the same; false otherwise.
--
--
public final boolean equals(Object obj)
Determines whether two objects are equal. Returns true if the objects are identical
Overrides:
equals in class Object
Parameters:
obj - the reference object with which to compare
Returns:
true if this object is the same as the obj argument, false otherwise
See Also:
Object.hashCode(), Hashtable
--
The description of the method does not give a univocal presentation about what objects are supposed to be equal. Let's consider the following pair of objects:
Sequencer.SyncMode sMode1 = new MySyncMode("one");
Sequencer.SyncMode sMode2 = new MySyncMode("one");
The present spec can not say definitely whether these 2 objects are equal. One can argue that the following statement answers the question:
--
Returns:
true if this object is the same as the obj argument, false otherwise
--
However "the same" can be treated in different ways. For example, see the "return" section for java.lang.Long:
--
Returns:
true if the objects are the same; false otherwise.
--