ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From co...@apache.org
Subject cvs commit: jakarta-ant/src/main/org/apache/tools/ant XmlLogger.java
Date Thu, 14 Feb 2002 13:27:04 GMT
conor       02/02/14 05:27:04

  Modified:    src/main/org/apache/tools/ant XmlLogger.java
  Log:
  Handle badly configured tasks created outside of Ant's core
  
  PR:	6309
  
  Revision  Changes    Path
  1.21      +5 -2      jakarta-ant/src/main/org/apache/tools/ant/XmlLogger.java
  
  Index: XmlLogger.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/src/main/org/apache/tools/ant/XmlLogger.java,v
  retrieving revision 1.20
  retrieving revision 1.21
  diff -u -w -u -r1.20 -r1.21
  --- XmlLogger.java	20 Jan 2002 20:45:56 -0000	1.20
  +++ XmlLogger.java	14 Feb 2002 13:27:04 -0000	1.21
  @@ -197,7 +197,7 @@
                   TimedElement poppedStack = (TimedElement)threadStack.pop();
                   if (poppedStack != targetElement) {
                       throw new RuntimeException("Mismatch - popped element = " + poppedStack.element
+
  -                    " finished task element = " + targetElement.element);
  +                    " finished target element = " + targetElement.element);
                   }
                   if (!threadStack.empty()) {
                       parentElement = (TimedElement)threadStack.peek();
  @@ -232,7 +232,10 @@
               long totalTime = System.currentTimeMillis() - taskElement.startTime;
               taskElement.element.setAttribute(TIME_ATTR, DefaultLogger.formatTime(totalTime));
               Target target = task.getOwningTarget();
  -            TimedElement targetElement = (TimedElement)targets.get(target);
  +            TimedElement targetElement = null;
  +            if (target != null) {
  +                targetElement = (TimedElement)targets.get(target);
  +            }
               if (targetElement == null) {
                   buildElement.element.appendChild(taskElement.element);
               }
  
  
  

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