Browse Source

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
master
Steve Loughran 23 years ago
parent
commit
dd8be3b5fd
2 changed files with 14 additions and 1 deletions
  1. +5
    -0
      WHATSNEW
  2. +9
    -1
      src/main/org/apache/tools/ant/taskdefs/optional/net/TelnetTask.java

+ 5
- 0
WHATSNEW View File

@@ -4,6 +4,11 @@ Changes from Ant 1.4.1 to current CVS version
Changes that could break older environments: Changes that could break older environments:
-------------------------------------------- --------------------------------------------


* <telnet> was fixed to expand properties inside nested <read> and
<write> 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 * the RegexpMatcher interface has been extended to support case
insensitive matches and other options - custom implementations of insensitive matches and other options - custom implementations of
this interface won't work any longer. We recommend to use the new this interface won't work any longer. We recommend to use the new


+ 9
- 1
src/main/org/apache/tools/ant/taskdefs/optional/net/TelnetTask.java View File

@@ -246,7 +246,15 @@ public class TelnetTask extends Task {
{ {
throw new BuildException("Shouldn't be able instantiate a SubTask directly"); 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) public void setString(String s)
{ {
taskString += s; taskString += s;


Loading…
Cancel
Save