On Thu, 29 Jul 2004 15:58:08 +0800, Niclas Hedhman <[EMAIL PROTECTED]> wrote: > On Thursday 29 July 2004 15:53, Leo Sutic wrote: > > That's a bug in ConfigurationUtils.equals. > > > > Child order ***is*** significant. > > I was hoping for that, but since someone spent a lot of time taking order out > of the equation, I suspected the worst. > > Since you seems very confident, I'll start with re-implementing a proper > equals() / hashCode() for DefaultConfiguration.
Reasoning goes like this: getChildren public Configuration[] getChildren() Return an Array of Configuration elements containing all node children. The array order will reflect the order in the source config file. Since order matters in the translation from source file to Configuration, we must conclude that order is significant. Otherwise, if you have code that is based on the assumption that the node order == order in config file, then that code will not consider two configurations equal, even if equals() does. /LS --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]