Issue Details (XML | Word | Printable)

Key: DISPL-238
Type: Bug Bug
Status: Closed Closed
Resolution: Fixed
Priority: Major Major
Reporter: Anonymous
Votes: 0
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
DisplayTag

org.displaytag.util.MultipleHtmlAttribute : css class composition is not safe

Created: 06/Sep/05 04:12 AM   Updated: 21/Sep/05 09:25 AM   Resolved: 11/Sep/05 07:02 AM
Component/s: None
Affects Version/s: 1.0
Fix Version/s: 1.1

Time Tracking:
Original Estimate: 2 minutes
Original Estimate - 2 minutes
Remaining Estimate: 2 minutes
Remaining Estimate - 2 minutes
Time Spent: Not Specified
Time Spent - Not Specified

File Attachments: 1. Java Source File MultipleHtmlAttribute.java (3 kB)


Application server: websphere 5.1 and websphere 5.0.2


 Description  « Hide
org.displaytag.util.MultipleHtmlAttribue use an HashSet to store the elements of css class namùe composition. But HashSet is not order safe and the same application deployed on a websphere 5.0.2 and websphere 5.1 does not have the same name at the result.

To resolve this bug you have to replace the HashSet use by a LinkedHashSet (import and line 58).

I may not create a patch since i does not have the rights tools at my office. Therefore i attach you the replacement class (with only the two modification).

fabrizio giustina added a comment - 06/Sep/05 03:54 PM
the order of css classes in not really meaningful: class="one two three" is exactly the same as class="two one three"
... so what's the point? Am I missing something?

fabrizio giustina added a comment - 11/Sep/05 07:02 AM
also if css class order is not important I committed the fix, since a stable order could be useful for unit tests.

Emmanuel Feller added a comment - 21/Sep/05 09:25 AM
Excuse me from beeing late !

Yes, you're wright on the css order, but in fact i changed the returned string to remove the space betwenn css classe names.
Therefor i may have "class1class2" or "class1 class2". So for me the iteration order was very important.

So thanks for the commit.

Emmanuel