chkal/pf-issue-test — Issue #113: RequestParameter+ equals/hashCode suboptimal when expression member is instanceof LazyExpression
Author: chkal
Created: 2012-03-06 07:38:00+00:00
State: open

Originally filed by **gudnabr...@gmail.com** on 2011-07-12T14:37:39

Google Code issue: http://code.google.com/p/prettyfaces/issues/detail?id=115

[What steps will reproduce the problem?]
1. Create a bean with multiple @URLMappings and some @URLQueryParameter.
2. Compare the same-named QueryParameter from two URLMappings.

[What is the expected output? What do you see instead?]

I would expect the QueryParameters to be equal. Instead, because their expressions are instances of LazyExpression (which does not implement equals/hashCode, presumably in the interest of laziness), an embedded equals/hashCode check is non-equal, causing the entire calculation to go awry.

[What version of PrettyFaces are you using? On what server and version,
version of JSF, and other relevant technologies?]

PrettyFaces 3.3.0 on MyFaces 2.1.2-SNAPSHOT, Tomcat 7