Hi Will, I assume HashSet was being used to ensure each node is only added once.
>From the way you describe it, it definately sounds like a bug. Either ArrayList should be used (if there is no chance of inserting duplicates) or maybe TreeSet (which combines the unique-element constraint of Set with the ordering properties of List). Regards from Vienna, Richard -----Ursprüngliche Nachricht----- Von: [email protected] [mailto:[email protected]] Im Auftrag von Will Scheidegger (via Magnolia Forums) Gesendet: Freitag, 23. November 2012 18:44 An: Magnolia User List Betreff: [magnolia-user] Re: What Java version is demoauthor.magnolia-cms.com running on? Getting nasty results here... After upgrading to Java 1.7 and still seeing the same misbehavior, I thought it would be a Good Thing (TM) to have a look at the Javadocs of HashSet. And bingo: http://docs.oracle.com/javase/7/docs/api/java/util/HashSet.html Quoting from the Javadoc: "This class implements the Set interface, backed by a hash table (actually a HashMap instance). It makes no guarantees as to the iteration order of the set; in particular, it does not guarantee that the order will remain constant over time." So I'm guessing now that what I'm seeing is not even a misbehavior in the first place. But why is HashSet being used in NodeUtil instead of something like ArrayList? Is this the bug? -will -- Context is everything: http://forum.magnolia-cms.com/forum/thread.html?threadId=aff7b09a-169e-4df7-ba78-5d2e0da2f2d4 ---------------------------------------------------------------- For list details, see http://www.magnolia-cms.com/community/mailing-lists.html Alternatively, use our forums: http://forum.magnolia-cms.com/ To unsubscribe, E-mail to: <[email protected]> ---------------------------------------------------------------- ---------------------------------------------------------------- For list details, see http://www.magnolia-cms.com/community/mailing-lists.html Alternatively, use our forums: http://forum.magnolia-cms.com/ To unsubscribe, E-mail to: <[email protected]> ----------------------------------------------------------------
