[jdom-interest] Sorting Children, Collections.sort, ComodificationException, etc., etc.

Gordon Tyler gordon.tyler at sitraka.com
Mon Sep 23 10:21:28 PDT 2002

Bradley S. Huffman wrote:

> public static void sortContent(Element element, Comparator comparator) {
>     // Get a List of the current children
>     List contentList = element.getContent();
>     // Temporarily remove all content
>     element.setContent(null);           

But since the list returned by element.getContent() is a "live" list, 
wouldn't this statement empty contentList?


Gordon Tyler
Software Developer, R&D
Sitraka -- Performance is Mission Critical

More information about the jdom-interest mailing list