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 pg...@apache.org on 2002/10/02 08:53:35 UTC

cvs commit: jakarta-james/src/java/org/apache/james/transport/matchers SenderIs.java RecipientIs.java

pgoldstein    2002/10/01 23:53:35

  Modified:    src/java/org/apache/james/transport/matchers SenderIs.java
                        RecipientIs.java
  Log:
  Making RecipientIs and SenderIs agree in behavior.
  
  Revision  Changes    Path
  1.3       +5 -5      jakarta-james/src/java/org/apache/james/transport/matchers/SenderIs.java
  
  Index: SenderIs.java
  ===================================================================
  RCS file: /home/cvs/jakarta-james/src/java/org/apache/james/transport/matchers/SenderIs.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- SenderIs.java	18 Jan 2002 02:48:38 -0000	1.2
  +++ SenderIs.java	2 Oct 2002 06:53:35 -0000	1.3
  @@ -9,10 +9,10 @@
   
   import org.apache.mailet.GenericMatcher;
   import org.apache.mailet.Mail;
  +import org.apache.mailet.MailAddress;
   
   import java.util.Collection;
   import java.util.StringTokenizer;
  -import java.util.Vector;
   
   /**
    * @version 1.0.0, 24/04/1999
  @@ -22,11 +22,11 @@
   
       private Collection senders;
   
  -    public void init() {
  -        StringTokenizer st = new StringTokenizer(getCondition(), ", ", false);
  -        senders = new Vector();
  +    public void init() throws javax.mail.MessagingException {
  +        StringTokenizer st = new StringTokenizer(getCondition(), ", \t", false);
  +        senders = new java.util.HashSet();
           while (st.hasMoreTokens()) {
  -            senders.add(st.nextToken());
  +            senders.add(new MailAddress(st.nextToken()));
           }
       }
   
  
  
  
  1.3       +3 -4      jakarta-james/src/java/org/apache/james/transport/matchers/RecipientIs.java
  
  Index: RecipientIs.java
  ===================================================================
  RCS file: /home/cvs/jakarta-james/src/java/org/apache/james/transport/matchers/RecipientIs.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- RecipientIs.java	18 Jan 2002 02:48:38 -0000	1.2
  +++ RecipientIs.java	2 Oct 2002 06:53:35 -0000	1.3
  @@ -10,8 +10,7 @@
   import org.apache.mailet.GenericRecipientMatcher;
   import org.apache.mailet.MailAddress;
   
  -import java.util.HashSet;
  -import java.util.Set;
  +import java.util.Collection;
   import java.util.StringTokenizer;
   
   /**
  @@ -21,11 +20,11 @@
    */
   public class RecipientIs extends GenericRecipientMatcher {
   
  -    private Set recipients;
  +    private Collection recipients;
   
       public void init() throws javax.mail.MessagingException {
           StringTokenizer st = new StringTokenizer(getCondition(), ", \t", false);
  -        recipients = new HashSet();
  +        recipients = new java.util.HashSet();
           while (st.hasMoreTokens()) {
               recipients.add(new MailAddress(st.nextToken()));
           }
  
  
  

--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>