avalon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Leo Sutic <leo.su...@gmail.com>
Subject Re: Semantic bug in Framework?
Date Thu, 29 Jul 2004 08:31:11 GMT
On Thu, 29 Jul 2004 15:58:08 +0800, Niclas Hedhman <niclas@hedhman.org> 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:

    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.


To unsubscribe, e-mail: dev-unsubscribe@avalon.apache.org
For additional commands, e-mail: dev-help@avalon.apache.org

View raw message