You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ant.apache.org by Erik Hatcher <ja...@ehatchersolutions.com> on 2001/12/04 03:14:12 UTC
[PATCH] Immutability Patch 2
Yup, its me again! :)
The issue that Peter brought up with ant/antcall is being addressed in this
patch. Property was modified to allow setting user properties without
warning, but that mode cannot be enabled from a <property> statement (I
removed the setUserProperty method as it was undocumented and probably only
used by ant/antcall under the covers).
Project had several calls to setProperty in it, which in theory could
generate a deprecated warning. I added an internal method to allow setting
"basedir" and a couple of other places to set a property silently if it
wasn't a user property (setPropertyInternal, its protected, although private
would have been ok with me too).
I modified getProperties and getUserProperties to return copies of the
collections to prevent modifications of properties that way.
I updated WHATSNEW (maybe the <available> back door shouldn't be mentioned
there - maybe we should just close that open door :).
This should be yet another step forward in the battle against property
mutability. Let me know if there are any problems with this patch or if
I've missed something.
Thanks,
Erik
Re: [PATCH] Immutability Patch 2
Posted by Erik Hatcher <ja...@ehatchersolutions.com>.
----- Original Message -----
From: "Peter Donald" <pe...@apache.org>
> Okay. I made a change here by making that constructor protected rather
than
> public. I also readded setUserProperty() so as not to break binary
> compatability. However I nooped it and made it print out a annoying
message.
Cool.
> I also removed isUserProperty as it was never used anywhere ;)
Oops... that was added in one of my many refactoring attempts.
> Well I will remove the blurb about available just in case it gives people
> ideas ;)
Looks good to me.
> Could you check I applied the patch correctly and didn;'t miss anything ;)
It all looks fine and works fine for me. Many thanks.
Now if I can just get folks convinced that <available>'s hole should be
patched..... :))
Erik
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>
Re: [PATCH] Immutability Patch 2
Posted by Peter Donald <pe...@apache.org>.
On Tue, 4 Dec 2001 13:14, Erik Hatcher wrote:
> Yup, its me again! :)
woohoo!
> The issue that Peter brought up with ant/antcall is being addressed in this
> patch. Property was modified to allow setting user properties without
> warning, but that mode cannot be enabled from a <property> statement (I
> removed the setUserProperty method as it was undocumented and probably only
> used by ant/antcall under the covers).
Okay. I made a change here by making that constructor protected rather than
public. I also readded setUserProperty() so as not to break binary
compatability. However I nooped it and made it print out a annoying message.
I also removed isUserProperty as it was never used anywhere ;)
> Project had several calls to setProperty in it, which in theory could
> generate a deprecated warning. I added an internal method to allow setting
> "basedir" and a couple of other places to set a property silently if it
> wasn't a user property (setPropertyInternal, its protected, although
> private would have been ok with me too).
private it is ! ;)
> I modified getProperties and getUserProperties to return copies of the
> collections to prevent modifications of properties that way.
excellent.
> I updated WHATSNEW (maybe the <available> back door shouldn't be mentioned
> there - maybe we should just close that open door :).
Well I will remove the blurb about available just in case it gives people
ideas ;)
> This should be yet another step forward in the battle against property
> mutability. Let me know if there are any problems with this patch or if
> I've missed something.
;)
Could you check I applied the patch correctly and didn;'t miss anything ;)
--
Cheers,
Pete
----------------------------------
"Don't play dumb with me.
I happen to be an expert at that"
- Maxwell Smart
----------------------------------
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>