ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bode...@apache.org
Subject cvs commit: ant/src/main/org/apache/tools/ant Project.java
Date Fri, 14 Jan 2005 10:09:23 GMT
bodewig     2005/01/14 02:09:23

  Modified:    src/main/org/apache/tools/ant Project.java
  Log:
  Silently ignore messages being written to System.err/out while a Listener is processing
a different message
  
  Revision  Changes    Path
  1.183     +15 -5     ant/src/main/org/apache/tools/ant/Project.java
  
  Index: Project.java
  ===================================================================
  RCS file: /home/cvs/ant/src/main/org/apache/tools/ant/Project.java,v
  retrieving revision 1.182
  retrieving revision 1.183
  diff -u -r1.182 -r1.183
  --- Project.java	10 Jan 2005 23:44:57 -0000	1.182
  +++ Project.java	14 Jan 2005 10:09:23 -0000	1.183
  @@ -1982,10 +1982,20 @@
           }
           synchronized (this) {
               if (loggingMessage) {
  -                throw new BuildException("Listener attempted to access "
  -                    + (priority == MSG_ERR ? "System.err" : "System.out")
  -                    + " with message [" + message
  -                    + "] - infinite loop terminated");
  +                /* 
  +                 * One of the Listeners has attempted to access
  +                 * System.err or System.out.
  +                 *
  +                 * We used to throw an exception in this case, but
  +                 * sometimes Listeners can't prevent it(like our own
  +                 * Log4jListener which invokes getLogger() which in
  +                 * turn wants to write to the console).
  +                 *
  +                 * @see http://marc.theaimsgroup.com/?t=110538624200006&r=1&w=2
  +                 *
  +                 * We now (Ant 1.7 and 1.6.3) simply swallow the message.
  +                 */
  +                return;
               }
               try {
                   loggingMessage = true;
  
  
  

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


Mime
View raw message