james-server-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From e...@apache.org
Subject svn commit: r1431201 - in /james/server/trunk: mailetcontainer-camel/src/test/java/org/apache/james/mailetcontainer/impl/matchers/BaseMatchersTest.java mailets/src/main/java/org/apache/james/transport/matchers/AbstractStorageQuota.java
Date Thu, 10 Jan 2013 08:03:21 GMT
Author: eric
Date: Thu Jan 10 08:03:20 2013
New Revision: 1431201

URL: http://svn.apache.org/viewvc?rev=1431201&view=rev
Log:
Fix package import further to upgrade to mailet 2.5.1-SNAPSHOT (JAMES-1467)

Modified:
    james/server/trunk/mailetcontainer-camel/src/test/java/org/apache/james/mailetcontainer/impl/matchers/BaseMatchersTest.java
    james/server/trunk/mailets/src/main/java/org/apache/james/transport/matchers/AbstractStorageQuota.java

Modified: james/server/trunk/mailetcontainer-camel/src/test/java/org/apache/james/mailetcontainer/impl/matchers/BaseMatchersTest.java
URL: http://svn.apache.org/viewvc/james/server/trunk/mailetcontainer-camel/src/test/java/org/apache/james/mailetcontainer/impl/matchers/BaseMatchersTest.java?rev=1431201&r1=1431200&r2=1431201&view=diff
==============================================================================
--- james/server/trunk/mailetcontainer-camel/src/test/java/org/apache/james/mailetcontainer/impl/matchers/BaseMatchersTest.java
(original)
+++ james/server/trunk/mailetcontainer-camel/src/test/java/org/apache/james/mailetcontainer/impl/matchers/BaseMatchersTest.java
Thu Jan 10 08:03:20 2013
@@ -19,8 +19,12 @@
 
 package org.apache.james.mailetcontainer.impl.matchers;
 
-import org.apache.james.mailet.standard.matchers.All;
-import org.apache.james.mailet.standard.matchers.RecipientIs;
+import java.util.Arrays;
+
+import javax.mail.MessagingException;
+
+import org.apache.james.transport.matchers.All;
+import org.apache.james.transport.matchers.RecipientIs;
 import org.apache.mailet.MailAddress;
 import org.apache.mailet.Matcher;
 import org.apache.mailet.base.test.FakeMail;
@@ -28,9 +32,6 @@ import org.apache.mailet.base.test.FakeM
 import org.apache.mailet.base.test.FakeMatcherConfig;
 import org.junit.Before;
 
-import javax.mail.MessagingException;
-import java.util.Arrays;
-
 public class BaseMatchersTest {
 
     protected FakeMailContext context;
@@ -40,8 +41,8 @@ public class BaseMatchersTest {
     @Before
     public void setUp() throws Exception {
         mockedMail = new FakeMail();
-        mockedMail.setRecipients(Arrays.asList(new MailAddress("test@james.apache.org"),
-                new MailAddress("test2@james.apache.org")));
+        mockedMail.setRecipients(Arrays.asList(new MailAddress("test@james.apache.org"),
new MailAddress(
+                "test2@james.apache.org")));
     }
 
     void setupCompositeMatcher(String matcherName, Class<? extends GenericCompositeMatcher>
matcherClass)

Modified: james/server/trunk/mailets/src/main/java/org/apache/james/transport/matchers/AbstractStorageQuota.java
URL: http://svn.apache.org/viewvc/james/server/trunk/mailets/src/main/java/org/apache/james/transport/matchers/AbstractStorageQuota.java?rev=1431201&r1=1431200&r2=1431201&view=diff
==============================================================================
--- james/server/trunk/mailets/src/main/java/org/apache/james/transport/matchers/AbstractStorageQuota.java
(original)
+++ james/server/trunk/mailets/src/main/java/org/apache/james/transport/matchers/AbstractStorageQuota.java
Thu Jan 10 08:03:20 2013
@@ -19,6 +19,13 @@
 
 package org.apache.james.transport.matchers;
 
+import java.util.Iterator;
+import java.util.List;
+import java.util.Locale;
+
+import javax.annotation.Resource;
+import javax.mail.MessagingException;
+
 import org.apache.james.mailbox.MailboxManager;
 import org.apache.james.mailbox.MailboxSession;
 import org.apache.james.mailbox.MessageManager;
@@ -30,7 +37,6 @@ import org.apache.james.mailbox.model.Ma
 import org.apache.james.mailbox.model.MailboxQuery;
 import org.apache.james.mailbox.model.MessageRange;
 import org.apache.james.mailbox.model.MessageResult;
-import org.apache.james.mailet.standard.matchers.AbstractQuotaMatcher;
 import org.apache.james.transport.util.MailetContextLog;
 import org.apache.james.user.api.UsersRepository;
 import org.apache.james.user.api.UsersRepositoryException;
@@ -38,12 +44,6 @@ import org.apache.mailet.Mail;
 import org.apache.mailet.MailAddress;
 import org.apache.mailet.MailetContext;
 
-import javax.annotation.Resource;
-import javax.mail.MessagingException;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Locale;
-
 /**
  * <p>
  * Experimental: Abstract matcher checking whether a recipient has exceeded a
@@ -59,7 +59,7 @@ import java.util.Locale;
  * can slow down things if there are many mails in the mailbox. Some users also
  * report big problems with the matcher if a JDBC based mailrepository is used.
  * </p>
- *
+ * 
  * @since 2.2.0
  */
 abstract public class AbstractStorageQuota extends AbstractQuotaMatcher {
@@ -90,8 +90,9 @@ abstract public class AbstractStorageQuo
      * recipient is a known user in the local server.<br>
      * If a subclass overrides this method it should "and"
      * <code>super.isRecipientChecked</code> to its check.
-     *
-     * @param recipient the recipient to check
+     * 
+     * @param recipient
+     *            the recipient to check
      */
     protected boolean isRecipientChecked(MailAddress recipient) throws MessagingException
{
         MailetContext mailetContext = getMailetContext();
@@ -108,8 +109,9 @@ abstract public class AbstractStorageQuo
 
     /**
      * Gets the storage used in the recipient's inbox.
-     *
-     * @param recipient the recipient to check
+     * 
+     * @param recipient
+     *            the recipient to check
      */
     protected long getUsed(MailAddress recipient, Mail _) throws MessagingException {
         long size = 0;
@@ -132,11 +134,12 @@ abstract public class AbstractStorageQuo
 
             // get all mailboxes for the user to calculate the size
             // TODO: See JAMES-1198
-            List<MailboxMetaData> mList = manager.search(new MailboxQuery(MailboxPath.inbox(session),
"",
-                    session.getPathDelimiter()), session);
+            List<MailboxMetaData> mList = manager.search(
+                    new MailboxQuery(MailboxPath.inbox(session), "", session.getPathDelimiter()),
session);
             for (MailboxMetaData aMList : mList) {
                 MessageManager mailbox = manager.getMailbox(aMList.getPath(), session);
-                Iterator<MessageResult> results = mailbox.getMessages(MessageRange.all(),
FetchGroupImpl.MINIMAL, session);
+                Iterator<MessageResult> results = mailbox.getMessages(MessageRange.all(),
FetchGroupImpl.MINIMAL,
+                        session);
                 while (results.hasNext()) {
                     size += results.next().getSize();
                 }



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