https://bz.apache.org/bugzilla/show_bug.cgi?id=62076master
@@ -788,6 +788,9 @@ public class Copy extends Task { | |||||
for (int i = 0; i < toCopy.length; i++) { | for (int i = 0; i < toCopy.length; i++) { | ||||
final File src = new File(fromDir, toCopy[i]); | final File src = new File(fromDir, toCopy[i]); | ||||
final String[] mappedFiles = mapper.mapFileName(toCopy[i]); | final String[] mappedFiles = mapper.mapFileName(toCopy[i]); | ||||
if (mappedFiles == null || mappedFiles.length == 0) { | |||||
continue; | |||||
} | |||||
if (!enableMultipleMappings) { | if (!enableMultipleMappings) { | ||||
map.put(src.getAbsolutePath(), | map.put(src.getAbsolutePath(), | ||||
@@ -836,7 +839,7 @@ public class Copy extends Task { | |||||
} | } | ||||
for (int i = 0; i < toCopy.length; i++) { | for (int i = 0; i < toCopy.length; i++) { | ||||
final String[] mappedFiles = mapper.mapFileName(toCopy[i].getName()); | final String[] mappedFiles = mapper.mapFileName(toCopy[i].getName()); | ||||
if (mappedFiles == null) { | |||||
if (mappedFiles == null || mappedFiles.length == 0) { | |||||
throw new BuildException("Can't copy a resource without a" | throw new BuildException("Can't copy a resource without a" | ||||
+ " name if the mapper doesn't" | + " name if the mapper doesn't" | ||||
+ " provide one."); | + " provide one."); | ||||
@@ -182,6 +182,9 @@ public class CopyPath extends Task { | |||||
String sourceFileName = sourceFiles[sources]; | String sourceFileName = sourceFiles[sources]; | ||||
File sourceFile = new File(sourceFileName); | File sourceFile = new File(sourceFileName); | ||||
String[] toFiles = (String[]) mapper.mapFileName(sourceFileName); | String[] toFiles = (String[]) mapper.mapFileName(sourceFileName); | ||||
if (toFiles == null) { | |||||
continue; | |||||
} | |||||
for (int i = 0; i < toFiles.length; i++) { | for (int i = 0; i < toFiles.length; i++) { | ||||
String destFileName = toFiles[i]; | String destFileName = toFiles[i]; | ||||
@@ -709,6 +709,9 @@ public class Rmic extends MatchingTask { | |||||
String classFileName = classname.replace('.', File.separatorChar) | String classFileName = classname.replace('.', File.separatorChar) | ||||
+ ".class"; | + ".class"; | ||||
String[] generatedFiles = adapter.getMapper().mapFileName(classFileName); | String[] generatedFiles = adapter.getMapper().mapFileName(classFileName); | ||||
if (generatedFiles == null) { | |||||
return; | |||||
} | |||||
for (int i = 0; i < generatedFiles.length; i++) { | for (int i = 0; i < generatedFiles.length; i++) { | ||||
final String generatedFile = generatedFiles[i]; | final String generatedFile = generatedFiles[i]; | ||||
@@ -255,7 +255,10 @@ public class Native2Ascii extends MatchingTask { | |||||
+ (count != 1 ? "s" : "") + " from "; | + (count != 1 ? "s" : "") + " from "; | ||||
log(message + srcDir + " to " + destDir); | log(message + srcDir + " to " + destDir); | ||||
for (int i = 0; i < files.length; i++) { | for (int i = 0; i < files.length; i++) { | ||||
convert(files[i], m.mapFileName(files[i])[0]); | |||||
String[] dest = m.mapFileName(files[i]); | |||||
if (dest != null && dest.length > 0) { | |||||
convert(files[i], dest[0]); | |||||
} | |||||
} | } | ||||
} | } | ||||