From dd8be3b5fd5d5b230d86a99d61022afdd7861c22 Mon Sep 17 00:00:00 2001 From: Steve Loughran Date: Tue, 19 Mar 2002 06:19:59 +0000 Subject: [PATCH] set properties in nested strings. not tested. git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@271894 13f79535-47bb-0310-9956-ffa450edef68 --- WHATSNEW | 5 +++++ .../tools/ant/taskdefs/optional/net/TelnetTask.java | 10 +++++++++- 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/WHATSNEW b/WHATSNEW index 69d357c2b..350921f5a 100644 --- a/WHATSNEW +++ b/WHATSNEW @@ -4,6 +4,11 @@ Changes from Ant 1.4.1 to current CVS version Changes that could break older environments: -------------------------------------------- +* was fixed to expand properties inside nested and + elements; before this only happened when you assigned the text + to the string attribute. If you had $ signs in the string, they may + need escaping. + * the RegexpMatcher interface has been extended to support case insensitive matches and other options - custom implementations of this interface won't work any longer. We recommend to use the new diff --git a/src/main/org/apache/tools/ant/taskdefs/optional/net/TelnetTask.java b/src/main/org/apache/tools/ant/taskdefs/optional/net/TelnetTask.java index 0786d7e96..89c097886 100644 --- a/src/main/org/apache/tools/ant/taskdefs/optional/net/TelnetTask.java +++ b/src/main/org/apache/tools/ant/taskdefs/optional/net/TelnetTask.java @@ -246,7 +246,15 @@ public class TelnetTask extends Task { { throw new BuildException("Shouldn't be able instantiate a SubTask directly"); } - public void addText(String s) { setString(s);} + /** + * nested text elements need their properties explicitly expanded + */ + public void addText(String s) { + setString(project.replaceProperties(s)); + } + /** + * attribute assignment of properties + */ public void setString(String s) { taskString += s;