james-server-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ieu...@apache.org
Subject svn commit: r1429276 [2/2] - in /james/server/trunk: ./ container-spring/ container-spring/src/main/java/org/apache/james/container/spring/bean/factory/mailrepositorystore/ data/data-file/src/main/java/org/apache/james/domainlist/xml/ data/data-file/sr...
Date Sat, 05 Jan 2013 13:09:12 GMT
Modified: james/server/trunk/protocols/protocols-smtp/src/main/java/org/apache/james/smtpserver/fastfail/ValidRcptMX.java
URL: http://svn.apache.org/viewvc/james/server/trunk/protocols/protocols-smtp/src/main/java/org/apache/james/smtpserver/fastfail/ValidRcptMX.java?rev=1429276&r1=1429275&r2=1429276&view=diff
==============================================================================
--- james/server/trunk/protocols/protocols-smtp/src/main/java/org/apache/james/smtpserver/fastfail/ValidRcptMX.java
(original)
+++ james/server/trunk/protocols/protocols-smtp/src/main/java/org/apache/james/smtpserver/fastfail/ValidRcptMX.java
Sat Jan  5 13:09:12 2013
@@ -19,14 +19,6 @@
 
 package org.apache.james.smtpserver.fastfail;
 
-import java.net.UnknownHostException;
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.Iterator;
-import java.util.List;
-
-import javax.annotation.Resource;
-
 import org.apache.commons.configuration.Configuration;
 import org.apache.commons.configuration.ConfigurationException;
 import org.apache.james.dnsservice.api.DNSService;
@@ -43,13 +35,21 @@ import org.apache.james.protocols.smtp.h
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
+import javax.annotation.Resource;
+import java.net.UnknownHostException;
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.Iterator;
+
 /**
  * This class can be used to reject email with bogus MX which is send from a
  * authorized user or an authorized network.
  */
 public class ValidRcptMX implements InitializingLifecycleAwareProtocolHandler, RcptHook {
 
-    /** This log is the fall back shared by all instances */
+    /**
+     * This log is the fall back shared by all instances
+     */
     private static final Logger FALLBACK_LOG = LoggerFactory.getLogger(ValidRcptMX.class);
 
     /**
@@ -67,9 +67,8 @@ public class ValidRcptMX implements Init
     /**
      * Sets the service log.<br>
      * Where available, a context sensitive log should be used.
-     * 
-     * @param log
-     *            not null
+     *
+     * @param log not null
      */
     public void setLog(Logger log) {
         this.serviceLog = log;
@@ -77,7 +76,7 @@ public class ValidRcptMX implements Init
 
     /**
      * Gets the DNS service.
-     * 
+     *
      * @return the dnsService
      */
     public final DNSService getDNSService() {
@@ -86,9 +85,8 @@ public class ValidRcptMX implements Init
 
     /**
      * Sets the DNS service.
-     * 
-     * @param dnsService
-     *            the dnsService to set
+     *
+     * @param dnsService the dnsService to set
      */
     @Resource(name = "dnsservice")
     public final void setDNSService(DNSService dnsService) {
@@ -98,11 +96,9 @@ public class ValidRcptMX implements Init
 
     /**
      * Set the banned networks
-     * 
-     * @param networks
-     *            Collection of networks
-     * @param dnsServer
-     *            The DNSServer
+     *
+     * @param networks  Collection of networks
+     * @param dnsServer The DNSServer
      */
     public void setBannedNetworks(Collection<String> networks, DNSService dnsServer)
{
         bNetwork = new NetMatcher(networks, dnsServer) {
@@ -112,10 +108,6 @@ public class ValidRcptMX implements Init
         };
     }
 
-    /**
-     * @see org.apache.james.protocols.smtp.hook.RcptHook#doRcpt(org.apache.james.protocols.smtp.SMTPSession,
-     *      org.apache.mailet.MailAddress, org.apache.mailet.MailAddress)
-     */
     public HookResult doRcpt(SMTPSession session, MailAddress sender, MailAddress rcpt) {
 
         String domain = rcpt.getDomain();
@@ -150,18 +142,15 @@ public class ValidRcptMX implements Init
         return new HookResult(HookReturnCode.DECLINED);
     }
 
-    @SuppressWarnings("unchecked")
     @Override
     public void init(Configuration config) throws ConfigurationException {
 
-        List<String> networks = config.getList("invalidMXNetworks");
+        String[] networks = config.getStringArray("invalidMXNetworks");
 
-        if (networks.isEmpty() == false) {
+        if (networks.length == 0) {
 
             Collection<String> bannedNetworks = new ArrayList<String>();
-
-            for (int i = 0; i < networks.size(); i++) {
-                String network = networks.get(i);
+            for (String network : networks) {
                 bannedNetworks.add(network.trim());
             }
 

Modified: james/server/trunk/queue/queue-activemq/pom.xml
URL: http://svn.apache.org/viewvc/james/server/trunk/queue/queue-activemq/pom.xml?rev=1429276&r1=1429275&r2=1429276&view=diff
==============================================================================
--- james/server/trunk/queue/queue-activemq/pom.xml (original)
+++ james/server/trunk/queue/queue-activemq/pom.xml Sat Jan  5 13:09:12 2013
@@ -94,6 +94,11 @@
             <groupId>org.slf4j</groupId>
             <artifactId>slf4j-api</artifactId>
         </dependency>
+       <dependency>
+           <groupId>org.slf4j</groupId>
+           <artifactId>slf4j-simple</artifactId>
+           <scope>test</scope>
+       </dependency>
         <dependency>
             <groupId>org.apache.geronimo.specs</groupId>
             <artifactId>geronimo-annotation_1.1_spec</artifactId>

Modified: james/server/trunk/queue/queue-file/pom.xml
URL: http://svn.apache.org/viewvc/james/server/trunk/queue/queue-file/pom.xml?rev=1429276&r1=1429275&r2=1429276&view=diff
==============================================================================
--- james/server/trunk/queue/queue-file/pom.xml (original)
+++ james/server/trunk/queue/queue-file/pom.xml Sat Jan  5 13:09:12 2013
@@ -54,6 +54,11 @@
             <artifactId>junit</artifactId>
             <scope>test</scope>
         </dependency>
+        <dependency>
+            <groupId>org.slf4j</groupId>
+            <artifactId>slf4j-simple</artifactId>
+            <scope>test</scope>
+        </dependency>
     </dependencies>
 
 </project>

Modified: james/server/trunk/queue/queue-jms/pom.xml
URL: http://svn.apache.org/viewvc/james/server/trunk/queue/queue-jms/pom.xml?rev=1429276&r1=1429275&r2=1429276&view=diff
==============================================================================
--- james/server/trunk/queue/queue-jms/pom.xml (original)
+++ james/server/trunk/queue/queue-jms/pom.xml Sat Jan  5 13:09:12 2013
@@ -56,6 +56,11 @@
             <artifactId>slf4j-api</artifactId>
         </dependency>
         <dependency>
+            <groupId>org.slf4j</groupId>
+            <artifactId>slf4j-simple</artifactId>
+            <scope>test</scope>
+        </dependency>
+        <dependency>
             <groupId>org.apache.geronimo.specs</groupId>
             <artifactId>geronimo-jms_1.1_spec</artifactId>
         </dependency>

Modified: james/server/trunk/queue/queue-jms/src/test/java/org/apache/james/queue/jms/JMSMailQueueTest.java
URL: http://svn.apache.org/viewvc/james/server/trunk/queue/queue-jms/src/test/java/org/apache/james/queue/jms/JMSMailQueueTest.java?rev=1429276&r1=1429275&r2=1429276&view=diff
==============================================================================
--- james/server/trunk/queue/queue-jms/src/test/java/org/apache/james/queue/jms/JMSMailQueueTest.java
(original)
+++ james/server/trunk/queue/queue-jms/src/test/java/org/apache/james/queue/jms/JMSMailQueueTest.java
Sat Jan  5 13:09:12 2013
@@ -84,8 +84,7 @@ public class JMSMailQueueTest {
         Logger log = LoggerFactory.getLogger("MockLog");
         // slf4j can't set programmatically any log level. It's just a facade
         // log.setLevel(SimpleLog.LOG_LEVEL_DEBUG);
-        JMSMailQueue aQueue = new JMSMailQueue(factory, queueName, log);
-        return aQueue;
+        return new JMSMailQueue(factory, queueName, log);
     }
 
     @After



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