You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@ant.apache.org by bo...@apache.org on 2017/04/11 14:30:11 UTC

[1/2] ant git commit: fix order if sections

Repository: ant
Updated Branches:
  refs/heads/1.9.x 5ef86aed6 -> 534747598


fix order if sections


Project: http://git-wip-us.apache.org/repos/asf/ant/repo
Commit: http://git-wip-us.apache.org/repos/asf/ant/commit/81fe6f68
Tree: http://git-wip-us.apache.org/repos/asf/ant/tree/81fe6f68
Diff: http://git-wip-us.apache.org/repos/asf/ant/diff/81fe6f68

Branch: refs/heads/1.9.x
Commit: 81fe6f68b641eb7ef61366d110af55671b1fdf8a
Parents: 5ef86ae
Author: Stefan Bodewig <bo...@apache.org>
Authored: Tue Apr 11 16:22:34 2017 +0200
Committer: Stefan Bodewig <bo...@apache.org>
Committed: Tue Apr 11 16:22:34 2017 +0200

----------------------------------------------------------------------
 WHATSNEW | 14 +++++++-------
 1 file changed, 7 insertions(+), 7 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ant/blob/81fe6f68/WHATSNEW
----------------------------------------------------------------------
diff --git a/WHATSNEW b/WHATSNEW
index ae2cb15..1f03df5 100644
--- a/WHATSNEW
+++ b/WHATSNEW
@@ -1,13 +1,6 @@
 Changes from Ant 1.9.9 TO Ant 1.9.10
 ====================================
 
-Other changes:
---------------
-
- * Added forceCsvQuoteChar option to <csv> task. When enabled the
-   values always get quoted.
-   Github Pull Request #32
-
 Fixed bugs:
 -----------
 
@@ -15,6 +8,13 @@ Fixed bugs:
    value.
    Bugzilla Report 60767
 
+Other changes:
+--------------
+
+ * Added forceCsvQuoteChar option to <csv> task. When enabled the
+   values always get quoted.
+   Github Pull Request #32
+
 Changes from Ant 1.9.8 TO Ant 1.9.9
 ===================================
 


[2/2] ant git commit: add regexp attribute to linecontainsregexp

Posted by bo...@apache.org.
add regexp attribute to linecontainsregexp

https://bz.apache.org/bugzilla/show_bug.cgi?id=60968


Project: http://git-wip-us.apache.org/repos/asf/ant/repo
Commit: http://git-wip-us.apache.org/repos/asf/ant/commit/53474759
Tree: http://git-wip-us.apache.org/repos/asf/ant/tree/53474759
Diff: http://git-wip-us.apache.org/repos/asf/ant/diff/53474759

Branch: refs/heads/1.9.x
Commit: 53474759846a9ade58ddbd6f24b1649f16e3233f
Parents: 81fe6f6
Author: Stefan Bodewig <bo...@apache.org>
Authored: Tue Apr 11 16:29:41 2017 +0200
Committer: Stefan Bodewig <bo...@apache.org>
Committed: Tue Apr 11 16:29:41 2017 +0200

----------------------------------------------------------------------
 WHATSNEW                                             |  3 +++
 manual/Types/filterchain.html                        |  7 ++++++-
 .../apache/tools/ant/filters/LineContainsRegExp.java | 15 +++++++++++----
 3 files changed, 20 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ant/blob/53474759/WHATSNEW
----------------------------------------------------------------------
diff --git a/WHATSNEW b/WHATSNEW
index 1f03df5..9dac453 100644
--- a/WHATSNEW
+++ b/WHATSNEW
@@ -15,6 +15,9 @@ Other changes:
    values always get quoted.
    Github Pull Request #32
 
+ * added "regexp" attribute to <linecontainsregexp>
+   Bugzilla Report 60968
+
 Changes from Ant 1.9.8 TO Ant 1.9.9
 ===================================
 

http://git-wip-us.apache.org/repos/asf/ant/blob/53474759/manual/Types/filterchain.html
----------------------------------------------------------------------
diff --git a/manual/Types/filterchain.html b/manual/Types/filterchain.html
index 90dd74b..c83b106 100644
--- a/manual/Types/filterchain.html
+++ b/manual/Types/filterchain.html
@@ -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.9.10 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>

http://git-wip-us.apache.org/repos/asf/ant/blob/53474759/src/main/org/apache/tools/ant/filters/LineContainsRegExp.java
----------------------------------------------------------------------
diff --git a/src/main/org/apache/tools/ant/filters/LineContainsRegExp.java b/src/main/org/apache/tools/ant/filters/LineContainsRegExp.java
index 23a2005..09dce77 100644
--- a/src/main/org/apache/tools/ant/filters/LineContainsRegExp.java
+++ b/src/main/org/apache/tools/ant/filters/LineContainsRegExp.java
@@ -220,6 +220,16 @@ public final class LineContainsRegExp
     }
 
     /**
+     * Set the regular expression as an attribute.
+     * @since Ant 1.9.10
+     */
+    public void setRegexp(String pattern) {
+        RegularExpression regexp = new RegularExpression();
+        regexp.setPattern(pattern);
+        regexps.addElement(regexp);
+    }
+
+    /**
      * Parses parameters to add user defined regular expressions.
      */
     private void initialize() {
@@ -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())) {