ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Antoine Levy-Lambert <anto...@gmx.de>
Subject Re: svn commit: r437589 - /ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/condition/AntVersion.java
Date Mon, 28 Aug 2006 12:09:40 GMT
Hi,

I am not very fond of this versionString.indexOf("Ant version")+17);  
either.
A regular expression looking for a string of digits and dots would be  
what we are looking for ?

Antoine
On Aug 28, 2006, at 10:52 AM, kevj@apache.org wrote:

> Author: kevj
> Date: Mon Aug 28 00:52:18 2006
> New Revision: 437589
>
> URL: http://svn.apache.org/viewvc?rev=437589&view=rev
> Log:
> fixed AntVersionTest failures with Beta1 - this should fix the  
> problem, let me know if it still breaks for you
>
> Modified:
>     ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/condition/ 
> AntVersion.java
>
> Modified: ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/ 
> condition/AntVersion.java
> URL: http://svn.apache.org/viewvc/ant/core/trunk/src/main/org/ 
> apache/tools/ant/taskdefs/condition/AntVersion.java? 
> rev=437589&r1=437588&r2=437589&view=diff
> ====================================================================== 
> ========
> --- ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/condition/ 
> AntVersion.java (original)
> +++ ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/condition/ 
> AntVersion.java Mon Aug 28 00:52:18 2006
> @@ -65,7 +65,7 @@
>          p.init();
>          String versionString = p.getProperty("ant.version");
>          String v = versionString.substring(versionString.indexOf 
> ("Ant version")+12,
> -                versionString.indexOf("compiled on")-1);
> +                versionString.indexOf("Ant version")+17);
>          char[] cs = v.toCharArray();
>          int end = cs.length;
>          for (int i = cs.length; i > 0; i--) {
>
>


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


Mime
View raw message