Browse Source

Merge branch '1.9.x'

master
Stefan Bodewig 8 years ago
parent
commit
00d140c1b2
3 changed files with 26 additions and 11 deletions
  1. +9
    -6
      WHATSNEW
  2. +6
    -1
      manual/Types/filterchain.html
  3. +11
    -4
      src/main/org/apache/tools/ant/filters/LineContainsRegExp.java

+ 9
- 6
WHATSNEW View File

@@ -1,6 +1,13 @@
Changes from Ant 1.10.1 TO Ant 1.10.2
=====================================

Fixed bugs:
-----------

* <genkey>'s <dname> child now skips <param>s that lack a key or
value.
Bugzilla Report 60767

Other changes:
--------------

@@ -15,12 +22,8 @@ Other changes:
* Added support for jarsigner's -tsadigestalg to <signjar>.
Bugzilla Report 60665

Fixed bugs:
-----------

* <genkey>'s <dname> child now skips <param>s that lack a key or
value.
Bugzilla Report 60767
* added "regexp" attribute to <linecontainsregexp>
Bugzilla Report 60968

Changes from Ant 1.10.0 TO Ant 1.10.1
=====================================


+ 6
- 1
manual/Types/filterchain.html View File

@@ -422,7 +422,12 @@ regular expression matching strings.
</tr>
<tr>
<td vAlign=top>regexp</td>
<td vAlign=top align="center">Regular expression to be searched for.</td>
<td vAlign=top align="center">Regular expression to be searched for.<br>
<em>Starting with 1.10.2 this also works as an attribute
on <code>linecontainsregexp</code>, in earlier versions of Ant
you must use a nested element when using the convenience
method.</em>
</td>
<td vAlign=top align="center">Yes</td>
</tr>
<tr>


+ 11
- 4
src/main/org/apache/tools/ant/filters/LineContainsRegExp.java View File

@@ -219,6 +219,16 @@ public final class LineContainsRegExp
return negate;
}

/**
* Set the regular expression as an attribute.
* @since Ant 1.10.2
*/
public void setRegexp(String pattern) {
RegularExpression regexp = new RegularExpression();
regexp.setPattern(pattern);
regexps.addElement(regexp);
}

/**
* Parses parameters to add user defined regular expressions.
*/
@@ -227,10 +237,7 @@ public final class LineContainsRegExp
if (params != null) {
for (int i = 0; i < params.length; i++) {
if (REGEXP_KEY.equals(params[i].getType())) {
String pattern = params[i].getValue();
RegularExpression regexp = new RegularExpression();
regexp.setPattern(pattern);
regexps.addElement(regexp);
setRegexp(params[i].getValue());
} else if (NEGATE_KEY.equals(params[i].getType())) {
setNegate(Project.toBoolean(params[i].getValue()));
} else if (CS_KEY.equals(params[i].getType())) {


Loading…
Cancel
Save