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 er...@apache.org on 2013/03/24 08:14:08 UTC
svn commit: r1460271 - in /james/server/trunk: ./
mailet/mailetcontainer-camel/src/test/java/org/apache/james/mailetcontainer/impl/matchers/
mailet/mailets/src/main/java/org/apache/james/transport/matchers/
Author: eric
Date: Sun Mar 24 07:14:08 2013
New Revision: 1460271
URL: http://svn.apache.org/r1460271
Log:
Update to apache-mailet-2.5.1-SNAPSHOT (JAMES-1491)
Modified:
james/server/trunk/mailet/mailetcontainer-camel/src/test/java/org/apache/james/mailetcontainer/impl/matchers/BaseMatchersTest.java
james/server/trunk/mailet/mailets/src/main/java/org/apache/james/transport/matchers/AbstractStorageQuota.java
james/server/trunk/pom.xml
Modified: james/server/trunk/mailet/mailetcontainer-camel/src/test/java/org/apache/james/mailetcontainer/impl/matchers/BaseMatchersTest.java
URL: http://svn.apache.org/viewvc/james/server/trunk/mailet/mailetcontainer-camel/src/test/java/org/apache/james/mailetcontainer/impl/matchers/BaseMatchersTest.java?rev=1460271&r1=1460270&r2=1460271&view=diff
==============================================================================
--- james/server/trunk/mailet/mailetcontainer-camel/src/test/java/org/apache/james/mailetcontainer/impl/matchers/BaseMatchersTest.java (original)
+++ james/server/trunk/mailet/mailetcontainer-camel/src/test/java/org/apache/james/mailetcontainer/impl/matchers/BaseMatchersTest.java Sun Mar 24 07:14:08 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;
@@ -56,7 +57,8 @@ public class BaseMatchersTest {
Matcher child;
if (matcherName.equals("All")) {
child = new All();
- } else {
+ }
+ else {
child = new RecipientIs();
}
FakeMatcherConfig sub = new FakeMatcherConfig(matcherName, context);
Modified: james/server/trunk/mailet/mailets/src/main/java/org/apache/james/transport/matchers/AbstractStorageQuota.java
URL: http://svn.apache.org/viewvc/james/server/trunk/mailet/mailets/src/main/java/org/apache/james/transport/matchers/AbstractStorageQuota.java?rev=1460271&r1=1460270&r2=1460271&view=diff
==============================================================================
--- james/server/trunk/mailet/mailets/src/main/java/org/apache/james/transport/matchers/AbstractStorageQuota.java (original)
+++ james/server/trunk/mailet/mailets/src/main/java/org/apache/james/transport/matchers/AbstractStorageQuota.java Sun Mar 24 07:14:08 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.inject.Inject;
+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.inject.Inject;
-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
*/
@Override
protected long getUsed(MailAddress recipient, Mail _) throws MessagingException {
@@ -122,10 +124,12 @@ abstract public class AbstractStorageQuo
// See JAMES-1197
if (localUsers.supportVirtualHosting()) {
username = recipient.toString().toLowerCase(Locale.US);
- } else {
+ }
+ else {
username = recipient.getLocalPart().toLowerCase(Locale.US);
}
- } catch (UsersRepositoryException e) {
+ }
+ catch (UsersRepositoryException e) {
throw new MessagingException("Unable to access UsersRepository", e);
}
session = manager.createSystemSession(username, log);
@@ -145,9 +149,11 @@ abstract public class AbstractStorageQuo
}
manager.endProcessingRequest(session);
manager.logout(session, true);
- } catch (BadCredentialsException e) {
+ }
+ catch (BadCredentialsException e) {
throw new MessagingException("Unable to authenticate to mailbox", e);
- } catch (MailboxException e) {
+ }
+ catch (MailboxException e) {
throw new MessagingException("Unable to get used space from mailbox", e);
}
Modified: james/server/trunk/pom.xml
URL: http://svn.apache.org/viewvc/james/server/trunk/pom.xml?rev=1460271&r1=1460270&r2=1460271&view=diff
==============================================================================
--- james/server/trunk/pom.xml (original)
+++ james/server/trunk/pom.xml Sun Mar 24 07:14:08 2013
@@ -125,7 +125,7 @@
<jackrabbit.version>2.5.2</jackrabbit.version>
<jsieve.version>0.6-SNAPSHOT</jsieve.version>
<mailbox.version>0.5</mailbox.version>
- <mailet.version>2.5.0</mailet.version>
+ <mailet.version>2.5.1-SNAPSHOT</mailet.version>
<protocols.version>1.6.3</protocols.version>
<spring.version>3.1.2.RELEASE</spring.version>
<geronimo-jms-spec.version>1.1.1</geronimo-jms-spec.version>
---------------------------------------------------------------------
To unsubscribe, e-mail: server-dev-unsubscribe@james.apache.org
For additional commands, e-mail: server-dev-help@james.apache.org