[Pogamut-list] Bug in MessageObject.equals()

nvh pogamut-forum at artemis.ms.mff.cuni.cz
Fri Mar 27 12:23:49 CET 2009


Bug in MessageObject.equals()

Author: nvh

Hi,

I found a bug in the equals method of cz.cuni.pogamut.MessageObjects.MessageObject. This is the current code:
^return ((mo.ID == this.ID) && (mo.UnrealID == this.UnrealID) && (mo.type == this.type));^
But because UnrealID is a string, you should compare them with String.equals(), making the line:
^return ((mo.ID == this.ID) && (mo.UnrealID.equals(this.UnrealID)) && (mo.type == this.type));^
Took me a while to figure out why it didn't work :)

Niels

I was also wondering if the new 2.3 version of pogamut is the version that is currently in svn://artemis.ms.mff.cuni.cz/pogamut/trunk/project/Core/src/, or that it is in a branch somewhere?





More information about the Pogamut-list mailing list