ant-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
Subject DO NOT REPLY [Bug 45372] New: Property substitution behaves odd in complex cases
Date Thu, 10 Jul 2008 11:41:42 GMT

           Summary: Property substitution behaves odd in complex cases
           Product: Ant
           Version: 1.7.0
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: minor
          Priority: P2
         Component: Core

Created an attachment (id=22242)
 --> (
Property substitution routines


<project default="print">
  <property file="" />
  <target name="print">
    <echo message="a: ${a}" />
    <echo message="b: ${b}" />
    <echo message="c: ${c}" />
    <echo message="d: ${d}" />
    <echo message="e: ${e}" />
    <echo message="f: ${f}" />


a: $
b: {
c: }
d: x
e: ${a}${b}d${c}
# f: ${e}


     [echo] a: $
     [echo] b: {
     [echo] c: }
     [echo] d: x
     [echo] e: ${d}
     [echo] f: ${f}

This is fine.

If we uncomment last line in, the result is quite surprising:

     [echo] a: $
     [echo] b: {
     [echo] c: }
     [echo] d: x
     [echo] e: x
     [echo] f: ${d}

The value of 'e' property changed, while we've just defined one more property. 
For me this is odd behavior.

My property-substitution code is attached.  Maybe it can help to make ant's
substitution algorithm more predictable.

Configure bugmail:
------- You are receiving this mail because: -------
You are the assignee for the bug.

View raw message