[prev in list] [next in list] [prev in thread] [next in thread] 

List:       james-dev
Subject:    [PATCH] LinearProcessor.java
From:       "Noel J. Bergman" <noel () devtech ! com>
Date:       2002-09-30 1:59:10
[Download RAW message or body]

Fixed my earlier submission.  The warning should not be issued for the
Mail.ERROR processor.

["LinearProcessor.java.txt" (text/plain)]

Index: src/java/org/apache/james/transport/LinearProcessor.java
===================================================================
RCS file: /home/cvspublic/jakarta-james/src/java/org/apache/james/transport/LinearProcessor.java,v
 retrieving revision 1.8
diff -u -r1.8 LinearProcessor.java
--- src/java/org/apache/james/transport/LinearProcessor.java	17 Aug 2002 18:43:55 \
                -0000	1.8
+++ src/java/org/apache/james/transport/LinearProcessor.java	30 Sep 2002 01:16:41 \
-0000 @@ -185,6 +185,17 @@
         Mailet terminatingMailet = 
             new GenericMailet() {
                 public void service(Mail mail) {
+                    if (!(Mail.ERROR.equals(mail.getState()))) {
+                        // Don't complain if we fall off the end of the
+                        // error processor.  That is currently the
+                        // normal situation for James, and the message
+                        // will show up in the error store.
+                        StringBuffer warnBuffer = new StringBuffer(256)
+                                              .append("Message ")
+                                              .append(((MailImpl)mail).getName())
+                                              .append(" reached the end of this \
processor, and is automatically deleted.  This may indicate a configuration error."); \
+                        \
LinearProcessor.this.getLogger().warn(warnBuffer.toString()); +                    }
                     mail.setState(Mail.GHOST);
                 }
             



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

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic