seq_contains uses String representation for Java Objects

Konrad Reiche <[email protected]>
Newsgroups gmane.comp.web.freemarker.user
Message-ID <[email protected]>
Hey everyone,

I am using Freemarker for my Java application, that's why I find myself 
often processing whole Java
objects which eases the template creation.

Now I have noticed the following, when invoking `seq_contains` on a list 
of Java Objects and not on,
for instance Strings or numbers, I receive true when both Objects have 
the same String representation,
even though they are actually different Objects due to `hash()`, 
`equals()` or `compareTo()`.

For now I have extended my `toString()` method to contain more 
information, which seems to be better,
but is there another solution to my problem?

Best Konrad

------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.