ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Magesh Umasankar" <umag...@apache.org>
Subject Re: cvs commit: ant/src/main/org/apache/tools/ant/taskdefs/optional ANTLR.java
Date Wed, 25 Jun 2003 19:03:27 GMT
To retain backwards compatibility, the old as
well as the new methods may live together.
Ant's IntrospectionHelper knows that it should
pick the method that takes in a File as its
parameter.  The String version should be
reworked to invoke the new method.


----- Original Message -----
From: "Antoine Levy-Lambert" <antoine@antbuild.com>
To: "Ant Developers List" <dev@ant.apache.org>
Sent: Wednesday, June 25, 2003 2:40 PM
Subject: Re: cvs commit: ant/src/main/org/apache/tools/ant/taskdefs/optional
ANTLR.java


> I would go for a further change :
> in ANTLR.java :
> change the signature of
>     public void setGlib(String superGrammar) {
> to
>     public void setGlib(File superGrammar) {
> which would have avoided the problem in the first place.
> Or do we prefer not to change signatures, even when they are not well
> chosen, to maintain API compatibility ?
>
> Antoine
>
> ----- Original Message -----
> From: <antoine@apache.org>
> To: <ant-cvs@apache.org>
> Sent: Wednesday, June 25, 2003 8:35 PM
> Subject: cvs commit: ant/src/main/org/apache/tools/ant/taskdefs/optional
> ANTLR.java
>
>
> > antoine     2003/06/25 11:35:28
> >
> >   Modified:    src/main/org/apache/tools/ant/taskdefs/optional
ANTLR.java
> >   Log:
> >   All the tests in ANTLRTest.java involving a super-grammar file were
> failing on Windows.
> >   This change fixes the problem.
> >
> >   Revision  Changes    Path
> >   1.28      +11 -1
> ant/src/main/org/apache/tools/ant/taskdefs/optional/ANTLR.java
> >
> >   Index: ANTLR.java
> >   ===================================================================
> >   RCS file:
> /home/cvs/ant/src/main/org/apache/tools/ant/taskdefs/optional/ANTLR.java,v
> >   retrieving revision 1.27
> >   retrieving revision 1.28
> >   diff -u -r1.27 -r1.28
> >   --- ANTLR.java 21 May 2003 13:29:55 -0000 1.27
> >   +++ ANTLR.java 25 Jun 2003 18:35:28 -0000 1.28
> >   @@ -66,6 +66,7 @@
> >    import org.apache.tools.ant.taskdefs.Execute;
> >    import org.apache.tools.ant.taskdefs.LogOutputStream;
> >    import org.apache.tools.ant.taskdefs.PumpStreamHandler;
> >   +import org.apache.tools.ant.taskdefs.condition.Os;
> >    import org.apache.tools.ant.types.Commandline;
> >    import org.apache.tools.ant.types.CommandlineJava;
> >    import org.apache.tools.ant.types.Path;
> >   @@ -143,9 +144,18 @@
> >
> >        /**
> >         * Sets an optional super grammar file.
> >   +     * @TODO change the semantic from String to File
> >         */
> >        public void setGlib(String superGrammar) {
> >   -        this.superGrammar = superGrammar;
> >   +        String sg = null;
> >   +        if (Os.isFamily("dos")) {
> >   +            sg = superGrammar.replace('\\','/');
> >   +        }
> >   +        else
> >   +        {
> >   +            sg = superGrammar;
> >   +        }
> >   +        this.superGrammar = sg;
> >        }
> >
> >        /**
> >
> >
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org
> > For additional commands, e-mail: dev-help@ant.apache.org
> >
> >
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org
> For additional commands, e-mail: dev-help@ant.apache.org
>


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


Mime
View raw message