DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUGĀ·
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=42277>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED ANDĀ·
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=42277

           Summary: String resources can have properties double expanded
           Product: Ant
           Version: 1.7Alpha (nightly)
          Platform: Other
        OS/Version: other
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Core tasks
        AssignedTo: dev@ant.apache.org
        ReportedBy: [EMAIL PROTECTED]


StringResource does a property expand on a getContent() operation:

    /**
     * Get the content of this StringResource.
     * @return a String; if the Project has been set properties
     *         replacement will be attempted.
     */
    protected synchronized String getContent() {
        if (isReference()) {
            return ((StringResource) getCheckedRef()).getContent();
        }
        String value = getValue();
        if (value == null) {
            return value;
        }
        return getProject() == null
            ? value : getProject().replaceProperties(value);
    }

but since the resource has its value set by the value attribute, that is, an
attribute setter, properties have already been expanded. 

This will double expand anything, such as $${ant.version}. 

I propose we conclude this is a real defect, and fix it, unless there is a good
explanation for double-expanding properties.

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to