ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cos...@apache.org
Subject cvs commit: jakarta-ant/src/main/org/apache/tools/ant/taskdefs Ant.java
Date Tue, 31 Dec 2002 17:36:16 GMT
costin      2002/12/31 09:36:16

  Modified:    src/main/org/apache/tools/ant/taskdefs Ant.java
  Log:
  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.
  
  Revision  Changes    Path
  1.68      +6 -1      jakarta-ant/src/main/org/apache/tools/ant/taskdefs/Ant.java
  
  Index: Ant.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/src/main/org/apache/tools/ant/taskdefs/Ant.java,v
  retrieving revision 1.67
  retrieving revision 1.68
  diff -u -r1.67 -r1.68
  --- Ant.java	25 Sep 2002 14:08:48 -0000	1.67
  +++ Ant.java	31 Dec 2002 17:36:15 -0000	1.68
  @@ -88,7 +88,7 @@
    * </pre>
    *
    *
  - * @author costin@dnt.ro
  + * @author Costin Manolache
    *
    * @since Ant 1.1
    *
  @@ -467,6 +467,11 @@
        */
       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 {
  
  
  

--
To unsubscribe, e-mail:   <mailto:ant-dev-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:ant-dev-help@jakarta.apache.org>


Mime
View raw message