Repository: ant
Updated Branches:
  refs/heads/1.9.x 21b870006 -> fc1ad4424


Change the copy-test#testResourceWithoutName to no longer expect a 
BuildException when the resource's name is null.

Detailed dev list discussion 
https://www.mail-archive.com/dev@ant.apache.org/msg46634.html


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

Branch: refs/heads/1.9.x
Commit: fc1ad4424dd42a5aad1a6f3013f45ab8bdb0f2f0
Parents: 21b8700
Author: Jaikiran Pai <jaiki...@apache.org>
Authored: Sat Feb 10 09:16:35 2018 +0530
Committer: Jaikiran Pai <jaiki...@apache.org>
Committed: Sat Feb 10 09:16:54 2018 +0530

----------------------------------------------------------------------
 WHATSNEW                                 |  9 +++++++++
 src/tests/antunit/taskdefs/copy-test.xml | 12 ++++++------
 2 files changed, 15 insertions(+), 6 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ant/blob/fc1ad442/WHATSNEW
----------------------------------------------------------------------
diff --git a/WHATSNEW b/WHATSNEW
index 2d4b6f1..8c2af62 100644
--- a/WHATSNEW
+++ b/WHATSNEW
@@ -1,6 +1,15 @@
 Changes from Ant 1.9.10 TO Ant 1.9.11
 =====================================
 
+Changes that could break older environments:
+-------------------------------------------
+
+ * Previous versions of Ant's copy task would throw a BuildException
+   if the "name" of the resource to copy was null. Starting
+   this version, the copy task instead silently skips such resources
+   and no longer throws an exception.
+   ant-dev list https://www.mail-archive.com/dev@ant.apache.org/msg46634.html
+
 Fixed bugs:
 -----------
 

http://git-wip-us.apache.org/repos/asf/ant/blob/fc1ad442/src/tests/antunit/taskdefs/copy-test.xml
----------------------------------------------------------------------
diff --git a/src/tests/antunit/taskdefs/copy-test.xml 
b/src/tests/antunit/taskdefs/copy-test.xml
index 51c6277..e73e13a 100644
--- a/src/tests/antunit/taskdefs/copy-test.xml
+++ b/src/tests/antunit/taskdefs/copy-test.xml
@@ -83,12 +83,12 @@ public class NullByteStreamResource extends Resource {
   </target>
 
   <target name="testResourceWithoutName"
-          depends="-setupNullByteStreamResource">
-    <au:expectfailure>
-      <copy todir="${output}">
-        <nullstream/>
-      </copy>
-    </au:expectfailure>
+          depends="-setupNullByteStreamResource" description="Tests that a
+          copy operation, of a resource without a name, doesn't run into (NPE)
+           exceptions. The resource itself will however be silently ignored">
+    <copy todir="${output}">
+      <nullstream/>
+    </copy>
   </target>
 
   <target name="testResourceWithoutNameWithMergeMapper"

Reply via email to