ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sbaill...@apache.org
Subject cvs commit: jakarta-ant/src/main/org/apache/tools/ant XmlLogger.java
Date Thu, 20 Dec 2001 21:42:42 GMT
sbailliez    01/12/20 13:42:42

  Modified:    src/main/org/apache/tools/ant XmlLogger.java
  Log:
  Instantiate the document in the constructor so that
  an event other than build started does not initiate a NPE.
  PR: 5538
  Reported by: sh@blsun.com (Scott Halstead)
  
  Revision  Changes    Path
  1.18      +1 -3      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.17
  retrieving revision 1.18
  diff -u -r1.17 -r1.18
  --- XmlLogger.java	2001/12/15 00:30:55	1.17
  +++ XmlLogger.java	2001/12/20 21:42:42	1.18
  @@ -101,7 +101,7 @@
       private final static String ERROR_ATTR = "error";
       private final static String STACKTRACE_TAG = "stacktrace";
   
  -    private Document doc;
  +    private Document doc = builder.newDocument();
       private Hashtable tasks = new Hashtable();
       private Hashtable targets = new Hashtable();
       private Hashtable threadStacks = new Hashtable();
  @@ -121,8 +121,6 @@
       public void buildStarted(BuildEvent event) {
           buildElement = new TimedElement();
           buildElement.startTime = System.currentTimeMillis();
  -
  -        doc = builder.newDocument();
           buildElement.element = doc.createElement(BUILD_TAG);
       }
   
  
  
  

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