Hi all,
I was playing around with Lift a bit (I'm using it in a new project)
when I found something unexpected in the net.liftweb.common.Box class;
namely that its equals method is not symmetric. See this gist for a
test that shows the problem:
https://gist.github.com/1953157
If foo and boxedFoo are supposed to be equal, then I would expect the
second and third test to both pass; if they are not, then I would
expect both tests to fail. Either way, I expect the first test to
pass.
The equals method can be made symmetric pretty easily by removing the
second case in the equals method (case (Full(x), y) => x == y). But
doing so will probably break lots of existing code :), so it may not
be the way to go.
I'm not sure what best to do with this, as it looks like a design
decision to have this special case in the equals method, but at the
very least I thought I should mention it here.
Regards,
Jan