DisplayTag

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

Details

  • Type: Bug Bug
  • Status: Closed Closed
  • Priority: Major Major
  • Resolution: Fixed
  • Affects Version/s: 1.0
  • Fix Version/s: 1.1
  • Component/s: None
  • Labels:
    None
  • Application server:
    websphere 5.1 and websphere 5.0.2

Description

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).

Activity

Hide
fabrizio giustina added a comment -
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?
Show
fabrizio giustina added a comment - 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?
Hide
fabrizio giustina added a comment -
also if css class order is not important I committed the fix, since a stable order could be useful for unit tests.
Show
fabrizio giustina added a comment - also if css class order is not important I committed the fix, since a stable order could be useful for unit tests.
Hide
Emmanuel Feller added a comment -
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
Show
Emmanuel Feller added a comment - 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

People

  • Reporter:
    Anonymous
Vote (0)
Watch (0)

Dates

  • Created:
    Updated:
    Resolved:

Time Tracking

Estimated:
2m
Original Estimate - 2 minutes
Remaining:
2m
Remaining Estimate - 2 minutes
Logged:
Not Specified
Time Spent - Not Specified