james-server-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rdon...@apache.org
Subject svn commit: r799836 - in /james/jsieve/trunk/mailet/src/main/java/org/apache/jsieve/mailet: RejectAction.java SieveMailAdapter.java SieveMailboxMailet.java
Date Sat, 01 Aug 2009 11:16:43 GMT
Author: rdonkin
Date: Sat Aug  1 11:16:42 2009
New Revision: 799836

URL: http://svn.apache.org/viewvc?rev=799836&view=rev
Log:
JSIEVE-53 Generify https://issues.apache.org/jira/browse/JSIEVE-53

Modified:
    james/jsieve/trunk/mailet/src/main/java/org/apache/jsieve/mailet/RejectAction.java
    james/jsieve/trunk/mailet/src/main/java/org/apache/jsieve/mailet/SieveMailAdapter.java
    james/jsieve/trunk/mailet/src/main/java/org/apache/jsieve/mailet/SieveMailboxMailet.java

Modified: james/jsieve/trunk/mailet/src/main/java/org/apache/jsieve/mailet/RejectAction.java
URL: http://svn.apache.org/viewvc/james/jsieve/trunk/mailet/src/main/java/org/apache/jsieve/mailet/RejectAction.java?rev=799836&r1=799835&r2=799836&view=diff
==============================================================================
--- james/jsieve/trunk/mailet/src/main/java/org/apache/jsieve/mailet/RejectAction.java (original)
+++ james/jsieve/trunk/mailet/src/main/java/org/apache/jsieve/mailet/RejectAction.java Sat
Aug  1 11:16:42 2009
@@ -76,7 +76,7 @@
         ActionUtils.detectAndHandleLocalLooping(aMail, context, "reject");
 
         // Create the MDN part
-        StringBuffer humanText = new StringBuffer(128);
+        StringBuilder humanText = new StringBuilder(128);
         humanText.append("This message was refused by the recipient's mail filtering program.");
         humanText.append("\r\n");
         humanText.append("The reason given was:");

Modified: james/jsieve/trunk/mailet/src/main/java/org/apache/jsieve/mailet/SieveMailAdapter.java
URL: http://svn.apache.org/viewvc/james/jsieve/trunk/mailet/src/main/java/org/apache/jsieve/mailet/SieveMailAdapter.java?rev=799836&r1=799835&r2=799836&view=diff
==============================================================================
--- james/jsieve/trunk/mailet/src/main/java/org/apache/jsieve/mailet/SieveMailAdapter.java
(original)
+++ james/jsieve/trunk/mailet/src/main/java/org/apache/jsieve/mailet/SieveMailAdapter.java
Sat Aug  1 11:16:42 2009
@@ -180,6 +180,7 @@
     {
         fieldActions = actions;
     }
+    
     /**
      * Updates the actions.
      */
@@ -203,6 +204,7 @@
             throw new SieveMailException(ex);
         }
     }
+    
     /**
      * @see org.apache.jsieve.mail.MailAdapter#getHeaderNames()
      */
@@ -223,6 +225,7 @@
             throw new SieveMailException(ex);
         }
     }
+    
     /**
      * @see org.apache.jsieve.mail.MailAdapter#getMatchingHeader(String)
      */
@@ -230,6 +233,7 @@
     {
         return MailUtils.getMatchingHeader(this, name);
     }
+    
     /**
      * @see org.apache.jsieve.mail.MailAdapter#getSize()
      */
@@ -244,6 +248,7 @@
             throw new SieveMailException(ex);
         }
     }
+    
     /**
      * Method getEnvelopes.
      * 
@@ -269,6 +274,7 @@
             values.add(value);
         return values;
     }
+    
     /**
      * @see org.apache.jsieve.mail.optional.EnvelopeAccessors#getEnvelopeNames()
      */
@@ -276,6 +282,7 @@
     {
         return new ArrayList<String>(getEnvelopes().keySet());
     }
+    
     /**
      * @see org.apache.jsieve.mail.optional.EnvelopeAccessors#getMatchingEnvelope(String)
      */
@@ -288,6 +295,7 @@
         }
         return matchedEnvelopeValues;
     }
+    
     /**
      * Returns the from.
      * 
@@ -298,6 +306,7 @@
         MailAddress sender = getMail().getSender(); 
         return (null == sender ? "" : sender.toString());
     }
+    
     /**
      * Returns the sole recipient or null if there isn't one.
      * 
@@ -311,6 +320,7 @@
             recipient = (String) recipientIter.next().toString();
         return recipient;
     }
+    
     /**
      * Returns the mail.
      * 
@@ -320,6 +330,7 @@
     {
         return fieldMail;
     }
+    
     /**
      * Sets the mail.
      * 
@@ -330,6 +341,7 @@
         fieldMail = mail;
         contentText = null;
     }
+    
     /**
      * Returns the mailetContext.
      * 
@@ -339,6 +351,7 @@
     {
         return fieldMailetContext;
     }
+    
     /**
      * Sets the mailetContext.
      * 
@@ -348,6 +361,7 @@
     {
         fieldMailetContext = mailetContext;
     }
+    
     /**
      * @see java.lang.Object#toString()
      */

Modified: james/jsieve/trunk/mailet/src/main/java/org/apache/jsieve/mailet/SieveMailboxMailet.java
URL: http://svn.apache.org/viewvc/james/jsieve/trunk/mailet/src/main/java/org/apache/jsieve/mailet/SieveMailboxMailet.java?rev=799836&r1=799835&r2=799836&view=diff
==============================================================================
--- james/jsieve/trunk/mailet/src/main/java/org/apache/jsieve/mailet/SieveMailboxMailet.java
(original)
+++ james/jsieve/trunk/mailet/src/main/java/org/apache/jsieve/mailet/SieveMailboxMailet.java
Sat Aug  1 11:16:42 2009
@@ -186,7 +186,7 @@
         return verbose || !quiet;
     }
 
-    //@Override
+    @Override
     public void init(MailetConfig config) throws MessagingException {
         
         super.init(config);
@@ -219,6 +219,7 @@
      *             if an error occurs while storing the mail
      */
     @SuppressWarnings("unchecked")
+    @Override
     public void service(Mail mail) throws MessagingException {
         Collection<MailAddress> recipients = mail.getRecipients();
         Collection<MailAddress> errors = new Vector<MailAddress>();
@@ -301,6 +302,7 @@
      * 
      * @return a string describing this mailet
      */
+    @Override
     public String getMailetInfo() {
         return "Sieve Mailbox Mailet";
     }
@@ -371,6 +373,7 @@
     /**
      * @see org.apache.mailet.base.GenericMailet#init()
      */
+    @Override
     public void init() throws MessagingException {
         super.init();
         if (poster == null || locator == null) {



---------------------------------------------------------------------
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