You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ant.apache.org by peter reilly <pe...@corvil.com> on 2003/07/23 17:44:10 UTC

Re: cvs commit: ant/src/testcases/org/apache/tools/ant/taskdefs PropertyTest.java

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