Browse Source

Ant will try to copy all inheritedReferences. Some may not exist.

Display a warning.

I don't understand very well the code - but we take the name from
"references" ( which is specified by the user ), and assume that
all of them exist. For some reason that's not allways true.


git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@273734 13f79535-47bb-0310-9956-ffa450edef68
master
Costin Manolache 22 years ago
parent
commit
71bdf3e03d
1 changed files with 6 additions and 1 deletions
  1. +6
    -1
      src/main/org/apache/tools/ant/taskdefs/Ant.java

+ 6
- 1
src/main/org/apache/tools/ant/taskdefs/Ant.java View File

@@ -88,7 +88,7 @@ import org.apache.tools.ant.util.FileUtils;
* </pre>
*
*
* @author costin@dnt.ro
* @author Costin Manolache
*
* @since Ant 1.1
*
@@ -467,6 +467,11 @@ public class Ant extends Task {
*/
private void copyReference(String oldKey, String newKey) {
Object orig = getProject().getReference(oldKey);
if( orig==null ) {
log( "No object referenced by " + oldKey + ". Can't copy to " + newKey,
Project.MSG_WARN);
return;
}
Class c = orig.getClass();
Object copy = orig;
try {


Loading…
Cancel
Save