james-server-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rdon...@apache.org
Subject svn commit: r800345 - in /james/mailet/standard/trunk/src/main/java/org/apache/james/transport/matchers: HasMailAttribute.java HasMailAttributeWithValue.java
Date Mon, 03 Aug 2009 13:00:44 GMT
Author: rdonkin
Date: Mon Aug  3 13:00:44 2009
New Revision: 800345

URL: http://svn.apache.org/viewvc?rev=800345&view=rev
Log:
MAILETSTANDARD-4 Matchers extends GenericMatcher should override init(), not init(MailetConfig).
Thanks to Amichai Rothman. https://issues.apache.org/jira/browse/MAILETSTANDARD-4

Modified:
    james/mailet/standard/trunk/src/main/java/org/apache/james/transport/matchers/HasMailAttribute.java
    james/mailet/standard/trunk/src/main/java/org/apache/james/transport/matchers/HasMailAttributeWithValue.java

Modified: james/mailet/standard/trunk/src/main/java/org/apache/james/transport/matchers/HasMailAttribute.java
URL: http://svn.apache.org/viewvc/james/mailet/standard/trunk/src/main/java/org/apache/james/transport/matchers/HasMailAttribute.java?rev=800345&r1=800344&r2=800345&view=diff
==============================================================================
--- james/mailet/standard/trunk/src/main/java/org/apache/james/transport/matchers/HasMailAttribute.java
(original)
+++ james/mailet/standard/trunk/src/main/java/org/apache/james/transport/matchers/HasMailAttribute.java
Mon Aug  3 13:00:44 2009
@@ -22,12 +22,13 @@
 package org.apache.james.transport.matchers;
 
 
-import org.apache.mailet.base.GenericMatcher;
-import org.apache.mailet.Mail;
-import org.apache.mailet.MatcherConfig;
 import java.util.Collection;
+
 import javax.mail.MessagingException;
 
+import org.apache.mailet.Mail;
+import org.apache.mailet.base.GenericMatcher;
+
 /**
  * <P>This Matcher determines if the mail contains the attribute specified in the
  * condition, and returns all recipients if it is the case.</P>
@@ -53,9 +54,9 @@
         return "Has Mail Attribute Matcher";
     }
 
-    public void init (MatcherConfig conf) throws MessagingException
+    public void init () throws MessagingException
     {
-        attributeName = conf.getCondition();
+        attributeName = getCondition();
     }
 
     /**

Modified: james/mailet/standard/trunk/src/main/java/org/apache/james/transport/matchers/HasMailAttributeWithValue.java
URL: http://svn.apache.org/viewvc/james/mailet/standard/trunk/src/main/java/org/apache/james/transport/matchers/HasMailAttributeWithValue.java?rev=800345&r1=800344&r2=800345&view=diff
==============================================================================
--- james/mailet/standard/trunk/src/main/java/org/apache/james/transport/matchers/HasMailAttributeWithValue.java
(original)
+++ james/mailet/standard/trunk/src/main/java/org/apache/james/transport/matchers/HasMailAttributeWithValue.java
Mon Aug  3 13:00:44 2009
@@ -25,9 +25,8 @@
 
 import javax.mail.MessagingException;
 
-import org.apache.mailet.base.GenericMatcher;
 import org.apache.mailet.Mail;
-import org.apache.mailet.MatcherConfig;
+import org.apache.mailet.base.GenericMatcher;
 
 /**
  * <p>This Matcher determines if the mail contains the attribute specified in
@@ -132,12 +131,11 @@
     }
 
     /**
-     * @see org.apache.mailet.Matcher#init(MatcherConfig)
+     * @see org.apache.mailet.Matcher#init()
      */
-    public void init(MatcherConfig config) throws MessagingException
+    public void init() throws MessagingException
     {
-        super.init(config);
-        String condition = config.getCondition().trim();
+        String condition = getCondition().trim();
         int commaPosition = condition.indexOf(',');
 
         if (-1 == commaPosition)



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


Mime
View raw message