You are viewing a plain text version of this content. The canonical link for it is here.
Posted to server-dev@james.apache.org by da...@apache.org on 2002/06/20 17:33:47 UTC
cvs commit: jakarta-james/src/java/org/apache/james/transport/mailets GenericListserv.java
danny 2002/06/20 08:33:47
Modified: src/java/org/apache/james/transport/mailets
GenericListserv.java
Log:
sorted the RE:RE:RE:RE bug
Revision Changes Path
1.5 +15 -0 jakarta-james/src/java/org/apache/james/transport/mailets/GenericListserv.java
Index: GenericListserv.java
===================================================================
RCS file: /home/cvs/jakarta-james/src/java/org/apache/james/transport/mailets/GenericListserv.java,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- GenericListserv.java 25 May 2002 14:37:04 -0000 1.4
+++ GenericListserv.java 20 Jun 2002 15:33:46 -0000 1.5
@@ -111,6 +111,21 @@
if (subj == null) {
subj = "";
}
+ //replace Re: with RE:
+ String re ="Re:";
+ int index = subj.indexOf(re);
+ while(index > -1){
+ subj = subj.substring(0, index) +"RE:"+ subj.substring(index + re.length() + 1);
+ index = subj.indexOf(re);
+ }
+ //reduce them to one at the beginning
+ re ="RE:";
+ index = subj.indexOf(re,re.length());
+ System.err.println("3i-"+index);
+ while(index > 0){
+ subj = subj.substring(0, index) + subj.substring(index + re.length() + 1);
+ index = subj.indexOf(re,1);
+ }
//If the "prefix" is in the subject line, remove it and everything before it
int index = subj.indexOf(prefix);
if (index > -1) {
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>