You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@excalibur.apache.org by Leif Mortenson <le...@tanukisoftware.com> on 2005/04/11 07:59:02 UTC

DefaultConfiguration intent

I have been working with clones of Configuration objects in a project I
am currently
working on and have discovered some problems.

1) If you create a new Configuration object with the constructor
new DefaultConfiguration( configuration ), you will get a new configuration
that is an exact duplicate of the original. The problem is that all of the
child Configuration instances are the same as the original instances. It
is not a deep clone. For my project, this is bad and I wanted to check
what was intended here. For now I will make a second constructor to
meed my needs.

2) The makeReadOnly() method of the DefaultConfiguration will set the
flag in the Configuration object on which it is called, but any child
configurations are not marked read only. This call should probably be
recursing into the children but it could of course affect application due
to #1 above.

Thoughts?
Leif


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


Re: DefaultConfiguration intent

Posted by hammett <ha...@uol.com.br>.
Sounds reasonable. +1

-- 
Cheers,
hammett
http://www.castleproject.org/~hammett


----- Original Message ----- 
From: "Leif Mortenson" <le...@tanukisoftware.com>
To: "Excalibur Developers List" <de...@excalibur.apache.org>
Sent: Monday, April 11, 2005 2:59 AM
Subject: DefaultConfiguration intent


>I have been working with clones of Configuration objects in a project I
> am currently
> working on and have discovered some problems.


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