[
https://issues.apache.org/jira/browse/IVY-374?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12462880
]
Maarten Coene commented on IVY-374:
-----------------------------------
It is not only the include and exclude elements that are in different order,
the configuration mapping isn't the same as well.
I think the order of this configuration mapping is important (especially if you
use wildcards), so we must surely keep the original order here.
> XmlModuleDescriptorWriterTest is broken
> ---------------------------------------
>
> Key: IVY-374
> URL: https://issues.apache.org/jira/browse/IVY-374
> Project: Ivy
> Issue Type: Bug
> Affects Versions: 1.4.1
> Reporter: Stephane Bailliez
> Priority: Minor
> Fix For: 1.5
>
>
> XmlModuleDescriptorWriterTest is using pure String comparison of serialized
> module descriptor.
> From a quick look, this does not work as it relies on ordering of values
> within a HashMap so it can only work if the ordering of the hashmap is the
> same as the one that was done when serializing the file used for reference.
> So if you try running the test with Sun JDK 6 it will fail while it will work
> with Sun JDK 5 since the hash method used as a default has been changed.
> To fix it as I can see right now:
> 1) you guarantee ordering and sort each element (lexicographically ?) within
> XmlModuleDescriptorWriter when serializing things
> 2) you don't guarantee ordering but you implement equals method for
> DefaultModuleDescriptor (which I assume will have a cascading effect for
> other classes)
> I think 1) makes more sense for now and we should go toward 2) so that more
> comparisons of objects can be done using equals() (esp. as there are a lot of
> objects that end up in maps)
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
https://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira