Menu

#7 MP3File.equals methods doesn't work

open
nobody
None
5
2002-01-12
2002-01-12
Anonymous
No

There is a problem with the MP3File.equals method
that if you try to compare an MP3File object with an
MP3File object you will always get false.
A suggested fix to this bug is to change the equals
methods from:

public boolean equals( Object o) {
return mp3.equals( o );
}

to:
public boolean equals( Object o ) {
if( o instanceof MP3File)
{
return mp3.equals(((MP3File)o).mp3);
}
return false;
}

Thanks

Great library!

Discussion


Log in to post a comment.

MongoDB Logo MongoDB