From: "Stephane Bailliez" <[EMAIL PROTECTED]>

> > From: Sam Ruby [mailto:[EMAIL PROTECTED]

> [...]
> > By the way, I am *very* concerned that -legacy will be used too
> > aggressively.  IMHO, it should only be used after a 
> > *significant* period of
> > deprecation, containing at a minimum one public release.  
> > [...]
> 
> Agreed. 1st release is a warning as used now. Next one means -legacy must be
> used.

I like it. Why don't we provide a simple API that simplifies maintaing this 
deprecated messages,
something like:

    public void deprecated(String message, String version) {

        String antversion = /*the current version */  + ".";
        version += ".";

        if (antversion.startsWith(version) || isInLegacyMode()) {
            log(message, ...);
        }
        else throw new BuildException(message);

    }

or something like that. The usage would be something like:

    public void setUserproperty(boolean user) {
        deprecated("You can only override properties using -Doption or as <ant> 
or <antcall> parameters", "1.5");
        //deprecated implementation
    }

This would really simplify maintaining deprecation rules in check. You only do 
it once.

Jose Alberto



--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to