ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From peter reilly <peter.rei...@corvil.com>
Subject Re: cvs commit: ant/src/testcases/org/apache/tools/ant/taskdefs PropertyTest.java
Date Wed, 23 Jul 2003 15:44:10 GMT
Excellent!
>   
>   
>   1.65      +4 -1      ant/src/main/org/apache/tools/ant/taskdefs/Property.java
>   
>   Index: Property.java
>   ===================================================================
>   RCS file: /home/cvs/ant/src/main/org/apache/tools/ant/taskdefs/Property.java,v
>   retrieving revision 1.64
>   retrieving revision 1.65
>   diff -u -r1.64 -r1.65
>   --- Property.java	19 Jul 2003 11:20:13 -0000	1.64
>   +++ Property.java	23 Jul 2003 15:14:19 -0000	1.65
>   @@ -573,6 +573,8 @@
>                String value = props.getProperty(name);
>    
>                boolean resolved = false;
>   +            Vector expandedReferences = new Vector();
>   +            expandedReferences.addElement(name);
>                while (!resolved) {
>                    Vector fragments = new Vector();
>                    Vector propertyRefs = new Vector();
>   @@ -588,11 +590,12 @@
>                            String fragment = (String) i.nextElement();
>                            if (fragment == null) {
>                                String propertyName = (String) j.nextElement();
>   -                            if (propertyName.equals(name)) {
>   +                            if (expandedReferences.contains(propertyName)) {
>                                    throw new BuildException("Property " + name
>                                                             + " was circularly "
>                                                             + "defined.");
>                                }
>   +                            expandedReferences.addElement(propertyName);
>                                fragment = getProject().getProperty(propertyName);
>                                if (fragment == null) {
>                                    if (props.containsKey(propertyName)) {
>   
>   
>   



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


Mime
View raw message