Bug 49542 - IteratedValueExpression and IndexedValueExpression implementation
Summary: IteratedValueExpression and IndexedValueExpression implementation
Alias: None
Product: Taglibs
Classification: Unclassified
Component: Standard Taglib (show other bugs)
Version: 1.2.0
Hardware: PC All
: P2 normal (vote)
Target Milestone: ---
Assignee: Tomcat Developers Mailing List
Depends on:
Reported: 2010-07-02 12:33 UTC by Jeremy Boynes
Modified: 2010-07-03 15:40 UTC (History)
0 users

Fix equals and serialUid (6.12 KB, patch)
2010-07-02 12:36 UTC, Jeremy Boynes
Details | Diff
Remove field added in error (6.01 KB, patch)
2010-07-03 14:58 UTC, Jeremy Boynes
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Jeremy Boynes 2010-07-02 12:33:06 UTC
The equals() methods on IndexedValueExpression and IteratedValueExpression are inconsistent with the implementation of hashCode() which does not fulfill the contract for equals().

The serialUID values for these two classes do not match the values defined in the specification JavaDoc.

The serialized fields for IteratedValueExpression are in a different order than defined in the specification JavaDoc. This may not really matter as one of those fields contains an IteratedExpression which is not Serializable.
Comment 1 Jeremy Boynes 2010-07-02 12:36:23 UTC
Created attachment 25686 [details]
Fix equals and serialUid

Also adds JavaDoc for methods not defined in base class.
Comment 2 Henri Yandell 2010-07-03 13:50:43 UTC
Why add the private lastContext variable to IteratedExpression?

Other than that it looks good.
Comment 3 Jeremy Boynes 2010-07-03 14:58:15 UTC
Created attachment 25693 [details]
Remove field added in error
Comment 4 Henri Yandell 2010-07-03 15:40:46 UTC
svn ci -m "Improved javadoc per Jeremy's #49542 patch" src/main/java/javax/servlet/jsp/jstl/core/IteratedExpression.java
Sending        src/main/java/javax/servlet/jsp/jstl/core/IteratedExpression.java
Transmitting file data .
Committed revision 960261.

svn ci -m "Fixing equals method to be consistent with hashCode, and making the serialVersionUID be 1L per the spec javadoc. Per Jeremy Boynes' #49542 report"
Sending        spec/src/main/java/javax/servlet/jsp/jstl/core/IndexedValueExpression.java
Sending        spec/src/main/java/javax/servlet/jsp/jstl/core/IteratedValueExpression.java
Transmitting file data ..
Committed revision 960262.