Bugs item #737515, was opened at 2003-05-14 09:34
Message generated for change (Comment added) made by maartenc
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=116035&aid=737515&group_id=16035

Category: None
Group: None
>Status: Closed
>Resolution: Wont Fix
Priority: 5
Submitted By: Nobody/Anonymous (nobody)
>Assigned to: Maarten Coene (maartenc)
Summary: BackedList is not implemented completely

Initial Comment:
The BackedList's set method is not implemented 
correctly. The org.dom4j.Element#element() method's 
javadoc says: "The list is backed by the element such 
that changes to the list will be reflected in the element 
though the reverse is not the case.". Using the set 
method on the BackedList, it does not take effect on the 
element.
Trying to use the following code:
List elements = element.elements();
Collections.sort(elements, <there is a comparator 
here>);

This code does not take effect on the element.

[EMAIL PROTECTED]

----------------------------------------------------------------------

>Comment By: Maarten Coene (maartenc)
Date: 2004-06-25 21:17

Message:
Logged In: YES 
user_id=178745

This is not a bug: the Collections.sort() algorithm requires
the List to be fully modifiable, which is not entirely the
case with the BackedList because it does not allow duplicate
items. To sort the List, another algorithm should be used
which doesn't require that the list should allow duplicate
entries.

Maarten

----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=116035&aid=737515&group_id=16035


-------------------------------------------------------
This SF.Net email sponsored by Black Hat Briefings & Training.
Attend Black Hat Briefings & Training, Las Vegas July 24-29 - 
digital self defense, top technical experts, no vendor pitches, 
unmatched networking opportunities. Visit www.blackhat.com
_______________________________________________
dom4j-dev mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/dom4j-dev

Reply via email to