ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bode...@apache.org
Subject cvs commit: jakarta-ant/src/main/org/apache/tools/ant Project.java
Date Fri, 08 Nov 2002 12:20:27 GMT
bodewig     2002/11/08 04:20:27

  Modified:    src/main/org/apache/tools/ant Tag: ANT_15_BRANCH
                        Project.java
  Log:
  Merge fix from CVS HEAD that suppresses wrong "Overriding previous
  definition of reference" messages.
  
  Revision  Changes    Path
  No                   revision
  
  
  No                   revision
  
  
  1.108.2.8 +12 -3     jakarta-ant/src/main/org/apache/tools/ant/Project.java
  
  Index: Project.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/src/main/org/apache/tools/ant/Project.java,v
  retrieving revision 1.108.2.7
  retrieving revision 1.108.2.8
  diff -u -r1.108.2.7 -r1.108.2.8
  --- Project.java	12 Jun 2002 08:45:30 -0000	1.108.2.7
  +++ Project.java	8 Nov 2002 12:20:26 -0000	1.108.2.8
  @@ -1773,11 +1773,20 @@
                   // no warning, this is not changing anything
                   return;
               }
  -            if (old != null) {
  +            if (old != null && !(old instanceof UnknownElement)) {
                   log("Overriding previous definition of reference to " + name,
                       MSG_WARN);
               }
  -            log("Adding reference: " + name + " -> " + value, MSG_DEBUG);
  +            String valueAsString = "";
  +            try {
  +                valueAsString = value.toString();
  +            } catch (Throwable t) {
  +                log("Caught exception (" + t.getClass().getName() +")"
  +                    + " while expanding " + name + ": " + t.getMessage(),
  +                    MSG_WARN);
  +            }
  +            log("Adding reference: " + name + " -> " + valueAsString,
  +                MSG_DEBUG);
               references.put(name, value);
           }
       }
  
  
  

--
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