Repository: ant
Updated Branches:
  refs/heads/master 3bb66d938 -> e90f71193


add some documentation hints

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


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

Branch: refs/heads/master
Commit: 801a44a2079d19479ddaed087dfe4a982ae955a3
Parents: ee33805
Author: Stefan Bodewig <bode...@apache.org>
Authored: Fri Feb 9 18:36:20 2018 +0100
Committer: Stefan Bodewig <bode...@apache.org>
Committed: Fri Feb 9 18:36:20 2018 +0100

----------------------------------------------------------------------
 src/main/org/apache/tools/ant/util/ChainedMapper.java  | 3 +++
 src/main/org/apache/tools/ant/util/FileNameMapper.java | 4 +++-
 2 files changed, 6 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ant/blob/801a44a2/src/main/org/apache/tools/ant/util/ChainedMapper.java
----------------------------------------------------------------------
diff --git a/src/main/org/apache/tools/ant/util/ChainedMapper.java 
b/src/main/org/apache/tools/ant/util/ChainedMapper.java
index 635a053..6e07aa6 100644
--- a/src/main/org/apache/tools/ant/util/ChainedMapper.java
+++ b/src/main/org/apache/tools/ant/util/ChainedMapper.java
@@ -35,6 +35,9 @@ public class ChainedMapper extends ContainerMapper {
     public String[] mapFileName(String sourceFileName) {
         List inputs = new ArrayList();
         List results = new ArrayList();
+        // we do this even if the sourceFileName is null. Some
+        // resources have a null name and users may use a mapper like
+        // MergeMapper to provide a name for it.
         results.add(sourceFileName);
         FileNameMapper mapper = null;
 

http://git-wip-us.apache.org/repos/asf/ant/blob/801a44a2/src/main/org/apache/tools/ant/util/FileNameMapper.java
----------------------------------------------------------------------
diff --git a/src/main/org/apache/tools/ant/util/FileNameMapper.java 
b/src/main/org/apache/tools/ant/util/FileNameMapper.java
index bbd8261..ec85f9d 100644
--- a/src/main/org/apache/tools/ant/util/FileNameMapper.java
+++ b/src/main/org/apache/tools/ant/util/FileNameMapper.java
@@ -52,7 +52,9 @@ public interface FileNameMapper {
      * omit the source file in question.</p>
      *
      * @param sourceFileName the name of the source file relative to
-     *                       some given basedirectory.
+     *                       some given basedirectory. Might be {@code
+     *                       null} for resources that don't provide a
+     *                       name.
      * @return an array of strings if the rule applies to the source file, or
      *         null if it does not.
      */

Reply via email to