james-server-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From matth...@apache.org
Subject svn commit: r1722812 [5/5] - in /james/project/trunk: backends-common/cassandra/ mailbox/api/src/test/java/org/apache/james/mailbox/manager/ mailbox/cassandra/ mailbox/cassandra/src/main/java/org/apache/james/mailbox/cassandra/modules/ mailbox/elastics...
Date Mon, 04 Jan 2016 09:40:20 GMT
Modified: james/project/trunk/server/protocols/jmap/src/main/java/org/apache/james/jmap/methods/JmapResponse.java
URL: http://svn.apache.org/viewvc/james/project/trunk/server/protocols/jmap/src/main/java/org/apache/james/jmap/methods/JmapResponse.java?rev=1722812&r1=1722811&r2=1722812&view=diff
==============================================================================
--- james/project/trunk/server/protocols/jmap/src/main/java/org/apache/james/jmap/methods/JmapResponse.java (original)
+++ james/project/trunk/server/protocols/jmap/src/main/java/org/apache/james/jmap/methods/JmapResponse.java Mon Jan  4 09:40:15 2016
@@ -20,7 +20,6 @@
 package org.apache.james.jmap.methods;
 
 import org.apache.james.jmap.model.ClientId;
-import org.apache.james.jmap.model.ProtocolRequest;
 
 import com.google.common.annotations.VisibleForTesting;
 

Modified: james/project/trunk/server/protocols/jmap/src/test/java/org/apache/james/jmap/methods/JmapRequestParserImplTest.java
URL: http://svn.apache.org/viewvc/james/project/trunk/server/protocols/jmap/src/test/java/org/apache/james/jmap/methods/JmapRequestParserImplTest.java?rev=1722812&r1=1722811&r2=1722812&view=diff
==============================================================================
--- james/project/trunk/server/protocols/jmap/src/test/java/org/apache/james/jmap/methods/JmapRequestParserImplTest.java (original)
+++ james/project/trunk/server/protocols/jmap/src/test/java/org/apache/james/jmap/methods/JmapRequestParserImplTest.java Mon Jan  4 09:40:15 2016
@@ -23,7 +23,6 @@ import org.apache.james.jmap.model.Proto
 import org.junit.Test;
 
 import com.fasterxml.jackson.databind.JsonNode;
-import com.fasterxml.jackson.databind.exc.UnrecognizedPropertyException;
 import com.fasterxml.jackson.databind.node.JsonNodeFactory;
 import com.fasterxml.jackson.databind.node.ObjectNode;
 import com.fasterxml.jackson.datatype.jdk8.Jdk8Module;

Modified: james/project/trunk/server/protocols/protocols-imap4/pom.xml
URL: http://svn.apache.org/viewvc/james/project/trunk/server/protocols/protocols-imap4/pom.xml?rev=1722812&r1=1722811&r2=1722812&view=diff
==============================================================================
--- james/project/trunk/server/protocols/protocols-imap4/pom.xml (original)
+++ james/project/trunk/server/protocols/protocols-imap4/pom.xml Mon Jan  4 09:40:15 2016
@@ -28,7 +28,6 @@
         <relativePath>../../pom.xml</relativePath>
     </parent>
 
-    <groupId>org.apache.james</groupId>
     <artifactId>james-server-protocols-imap4</artifactId>
     <packaging>bundle</packaging>
 
@@ -47,7 +46,6 @@
         <dependency>
             <groupId>org.apache.james.protocols</groupId>
             <artifactId>protocols-imap</artifactId>
-            <version>${protocols.version}</version>
         </dependency>
 
         <dependency>

Modified: james/project/trunk/server/protocols/protocols-imap4/src/main/java/org/apache/james/imapserver/netty/IMAPServerFactory.java
URL: http://svn.apache.org/viewvc/james/project/trunk/server/protocols/protocols-imap4/src/main/java/org/apache/james/imapserver/netty/IMAPServerFactory.java?rev=1722812&r1=1722811&r2=1722812&view=diff
==============================================================================
--- james/project/trunk/server/protocols/protocols-imap4/src/main/java/org/apache/james/imapserver/netty/IMAPServerFactory.java (original)
+++ james/project/trunk/server/protocols/protocols-imap4/src/main/java/org/apache/james/imapserver/netty/IMAPServerFactory.java Mon Jan  4 09:40:15 2016
@@ -63,7 +63,6 @@ public class IMAPServerFactory extends A
        return new IMAPServer();
     }
     
-    @SuppressWarnings("unchecked")
     @Override
     protected List<AbstractConfigurableAsyncServer> createServers(Logger log, HierarchicalConfiguration config) throws Exception {
         

Modified: james/project/trunk/server/protocols/protocols-library/pom.xml
URL: http://svn.apache.org/viewvc/james/project/trunk/server/protocols/protocols-library/pom.xml?rev=1722812&r1=1722811&r2=1722812&view=diff
==============================================================================
--- james/project/trunk/server/protocols/protocols-library/pom.xml (original)
+++ james/project/trunk/server/protocols/protocols-library/pom.xml Mon Jan  4 09:40:15 2016
@@ -28,7 +28,6 @@
         <relativePath>../../pom.xml</relativePath>
     </parent>
 
-    <groupId>org.apache.james</groupId>
     <artifactId>james-server-protocols-library</artifactId>
     <packaging>bundle</packaging>
 

Modified: james/project/trunk/server/protocols/protocols-library/src/main/java/org/apache/james/protocols/lib/ProtocolHandlerChainImpl.java
URL: http://svn.apache.org/viewvc/james/project/trunk/server/protocols/protocols-library/src/main/java/org/apache/james/protocols/lib/ProtocolHandlerChainImpl.java?rev=1722812&r1=1722811&r2=1722812&view=diff
==============================================================================
--- james/project/trunk/server/protocols/protocols-library/src/main/java/org/apache/james/protocols/lib/ProtocolHandlerChainImpl.java (original)
+++ james/project/trunk/server/protocols/protocols-library/src/main/java/org/apache/james/protocols/lib/ProtocolHandlerChainImpl.java Mon Jan  4 09:40:15 2016
@@ -50,7 +50,6 @@ public class ProtocolHandlerChainImpl im
         this.jmxHandlersPackage = jmxHandlersPackage.getName();
     }
 
-    @SuppressWarnings("unchecked")
     public void init() throws Exception {
         List<org.apache.commons.configuration.HierarchicalConfiguration> children = handlerchainConfig.configurationsAt("handler");
 

Modified: james/project/trunk/server/protocols/protocols-library/src/main/java/org/apache/james/protocols/lib/Slf4jLoggerAdapter.java
URL: http://svn.apache.org/viewvc/james/project/trunk/server/protocols/protocols-library/src/main/java/org/apache/james/protocols/lib/Slf4jLoggerAdapter.java?rev=1722812&r1=1722811&r2=1722812&view=diff
==============================================================================
--- james/project/trunk/server/protocols/protocols-library/src/main/java/org/apache/james/protocols/lib/Slf4jLoggerAdapter.java (original)
+++ james/project/trunk/server/protocols/protocols-library/src/main/java/org/apache/james/protocols/lib/Slf4jLoggerAdapter.java Mon Jan  4 09:40:15 2016
@@ -98,7 +98,7 @@ public class Slf4jLoggerAdapter implemen
         
     }
 
-    public void debug(String arg0, Object[] arg1) {
+    public void debug(String arg0, Object... arg1) {
         throw new UnsupportedOperationException();
         
     }
@@ -118,7 +118,7 @@ public class Slf4jLoggerAdapter implemen
         
     }
 
-    public void debug(Marker arg0, String arg1, Object[] arg2) {
+    public void debug(Marker arg0, String arg1, Object... arg2) {
         throw new UnsupportedOperationException();
         
     }
@@ -138,7 +138,7 @@ public class Slf4jLoggerAdapter implemen
         
     }
 
-    public void error(String arg0, Object[] arg1) {
+    public void error(String arg0, Object... arg1) {
         throw new UnsupportedOperationException();
         
     }
@@ -158,7 +158,7 @@ public class Slf4jLoggerAdapter implemen
         
     }
 
-    public void error(Marker arg0, String arg1, Object[] arg2) {
+    public void error(Marker arg0, String arg1, Object... arg2) {
         throw new UnsupportedOperationException();
         
     }
@@ -182,7 +182,7 @@ public class Slf4jLoggerAdapter implemen
         
     }
 
-    public void info(String arg0, Object[] arg1) {
+    public void info(String arg0, Object... arg1) {
         throw new UnsupportedOperationException();
         
     }
@@ -202,7 +202,7 @@ public class Slf4jLoggerAdapter implemen
         
     }
 
-    public void info(Marker arg0, String arg1, Object[] arg2) {
+    public void info(Marker arg0, String arg1, Object... arg2) {
         throw new UnsupportedOperationException();
         
     }
@@ -242,7 +242,7 @@ public class Slf4jLoggerAdapter implemen
         
     }
 
-    public void trace(String arg0, Object[] arg1) {
+    public void trace(String arg0, Object... arg1) {
         throw new UnsupportedOperationException();
         
     }
@@ -262,7 +262,7 @@ public class Slf4jLoggerAdapter implemen
         
     }
 
-    public void trace(Marker arg0, String arg1, Object[] arg2) {
+    public void trace(Marker arg0, String arg1, Object... arg2) {
         throw new UnsupportedOperationException();
         
     }
@@ -282,7 +282,7 @@ public class Slf4jLoggerAdapter implemen
         
     }
 
-    public void warn(String arg0, Object[] arg1) {
+    public void warn(String arg0, Object... arg1) {
         throw new UnsupportedOperationException();
         
     }
@@ -302,7 +302,7 @@ public class Slf4jLoggerAdapter implemen
         
     }
 
-    public void warn(Marker arg0, String arg1, Object[] arg2) {
+    public void warn(Marker arg0, String arg1, Object... arg2) {
         throw new UnsupportedOperationException();
         
     }

Modified: james/project/trunk/server/protocols/protocols-library/src/main/java/org/apache/james/protocols/lib/jmx/AbstractConnectHandlerResultJMXMonitor.java
URL: http://svn.apache.org/viewvc/james/project/trunk/server/protocols/protocols-library/src/main/java/org/apache/james/protocols/lib/jmx/AbstractConnectHandlerResultJMXMonitor.java?rev=1722812&r1=1722811&r2=1722812&view=diff
==============================================================================
--- james/project/trunk/server/protocols/protocols-library/src/main/java/org/apache/james/protocols/lib/jmx/AbstractConnectHandlerResultJMXMonitor.java (original)
+++ james/project/trunk/server/protocols/protocols-library/src/main/java/org/apache/james/protocols/lib/jmx/AbstractConnectHandlerResultJMXMonitor.java Mon Jan  4 09:40:15 2016
@@ -85,12 +85,11 @@ public abstract class AbstractConnectHan
      * @see
      * org.apache.james.protocols.api.handler.ExtensibleHandler#wireExtensions(java.lang.Class, java.util.List)
      */
-    @SuppressWarnings({ "unchecked", "rawtypes" })
     public void wireExtensions(Class<?> interfaceName, List<?> extension) throws WiringException {
         if (interfaceName.equals(ConnectHandler.class)) {
             // add stats for all hooks
             for (Object anExtension : extension) {
-                ConnectHandler c = (ConnectHandler) anExtension;
+                ConnectHandler<?> c = (ConnectHandler<?>) anExtension;
                 if (!equals(c)) {
                     String cName = c.getClass().getName();
                     try {

Modified: james/project/trunk/server/protocols/protocols-library/src/main/java/org/apache/james/protocols/lib/jmx/AbstractLineHandlerResultJMXMonitor.java
URL: http://svn.apache.org/viewvc/james/project/trunk/server/protocols/protocols-library/src/main/java/org/apache/james/protocols/lib/jmx/AbstractLineHandlerResultJMXMonitor.java?rev=1722812&r1=1722811&r2=1722812&view=diff
==============================================================================
--- james/project/trunk/server/protocols/protocols-library/src/main/java/org/apache/james/protocols/lib/jmx/AbstractLineHandlerResultJMXMonitor.java (original)
+++ james/project/trunk/server/protocols/protocols-library/src/main/java/org/apache/james/protocols/lib/jmx/AbstractLineHandlerResultJMXMonitor.java Mon Jan  4 09:40:15 2016
@@ -66,13 +66,12 @@ public abstract class AbstractLineHandle
      * @see
      * org.apache.james.protocols.api.handler.ExtensibleHandler#wireExtensions(java.lang.Class, java.util.List)
      */
-    @SuppressWarnings({ "unchecked", "rawtypes" })
     public void wireExtensions(Class<?> interfaceName, List<?> extension) throws WiringException {
 
         if (interfaceName.equals(LineHandler.class)) {
             // add stats for all hooks
             for (Object anExtension : extension) {
-                LineHandler c = (LineHandler) anExtension;
+                LineHandler<?> c = (LineHandler<?>) anExtension;
                 if (!equals(c)) {
                     String cName = c.getClass().getName();
                     try {

Modified: james/project/trunk/server/protocols/protocols-lmtp/pom.xml
URL: http://svn.apache.org/viewvc/james/project/trunk/server/protocols/protocols-lmtp/pom.xml?rev=1722812&r1=1722811&r2=1722812&view=diff
==============================================================================
--- james/project/trunk/server/protocols/protocols-lmtp/pom.xml (original)
+++ james/project/trunk/server/protocols/protocols-lmtp/pom.xml Mon Jan  4 09:40:15 2016
@@ -28,7 +28,6 @@
         <relativePath>../../pom.xml</relativePath>
     </parent>
 
-    <groupId>org.apache.james</groupId>
     <artifactId>james-server-protocols-lmtp</artifactId>
     <packaging>bundle</packaging>
 

Modified: james/project/trunk/server/protocols/protocols-lmtp/src/main/java/org/apache/james/lmtpserver/DataLineLMTPHandler.java
URL: http://svn.apache.org/viewvc/james/project/trunk/server/protocols/protocols-lmtp/src/main/java/org/apache/james/lmtpserver/DataLineLMTPHandler.java?rev=1722812&r1=1722811&r2=1722812&view=diff
==============================================================================
--- james/project/trunk/server/protocols/protocols-lmtp/src/main/java/org/apache/james/lmtpserver/DataLineLMTPHandler.java (original)
+++ james/project/trunk/server/protocols/protocols-lmtp/src/main/java/org/apache/james/lmtpserver/DataLineLMTPHandler.java Mon Jan  4 09:40:15 2016
@@ -90,7 +90,7 @@ public class DataLineLMTPHandler extends
 
     @SuppressWarnings("unchecked")
     @Override
-    public void wireExtensions(Class interfaceName, List extension) throws WiringException {
+    public void wireExtensions(Class<?> interfaceName, List<?> extension) throws WiringException {
         if (interfaceName.equals(DeliverToRecipientHook.class)) {
             handlers.addAll((Collection<? extends DeliverToRecipientHook>) extension);
         }

Modified: james/project/trunk/server/protocols/protocols-lmtp/src/main/java/org/apache/james/lmtpserver/netty/LMTPServerFactory.java
URL: http://svn.apache.org/viewvc/james/project/trunk/server/protocols/protocols-lmtp/src/main/java/org/apache/james/lmtpserver/netty/LMTPServerFactory.java?rev=1722812&r1=1722811&r2=1722812&view=diff
==============================================================================
--- james/project/trunk/server/protocols/protocols-lmtp/src/main/java/org/apache/james/lmtpserver/netty/LMTPServerFactory.java (original)
+++ james/project/trunk/server/protocols/protocols-lmtp/src/main/java/org/apache/james/lmtpserver/netty/LMTPServerFactory.java Mon Jan  4 09:40:15 2016
@@ -49,7 +49,6 @@ public class LMTPServerFactory extends A
        return new LMTPServer();
     }
     
-    @SuppressWarnings("unchecked")
     @Override
     protected List<AbstractConfigurableAsyncServer> createServers(Logger log, HierarchicalConfiguration config) throws Exception{
         List<AbstractConfigurableAsyncServer> servers = new ArrayList<AbstractConfigurableAsyncServer>();

Modified: james/project/trunk/server/protocols/protocols-managesieve/src/main/java/org/apache/james/managesieveserver/netty/ManageSieveServerFactory.java
URL: http://svn.apache.org/viewvc/james/project/trunk/server/protocols/protocols-managesieve/src/main/java/org/apache/james/managesieveserver/netty/ManageSieveServerFactory.java?rev=1722812&r1=1722811&r2=1722812&view=diff
==============================================================================
--- james/project/trunk/server/protocols/protocols-managesieve/src/main/java/org/apache/james/managesieveserver/netty/ManageSieveServerFactory.java (original)
+++ james/project/trunk/server/protocols/protocols-managesieve/src/main/java/org/apache/james/managesieveserver/netty/ManageSieveServerFactory.java Mon Jan  4 09:40:15 2016
@@ -19,9 +19,14 @@
 
 package org.apache.james.managesieveserver.netty;
 
+import java.util.ArrayList;
+import java.util.List;
+
+import javax.annotation.PostConstruct;
+import javax.inject.Inject;
+
 import org.apache.commons.configuration.HierarchicalConfiguration;
 import org.apache.james.filesystem.api.FileSystem;
-import org.apache.james.managesieve.api.SieveParser;
 import org.apache.james.managesieve.core.CoreProcessor;
 import org.apache.james.managesieve.jsieve.Parser;
 import org.apache.james.managesieve.transcode.ArgumentParser;
@@ -32,11 +37,6 @@ import org.apache.james.sieverepository.
 import org.apache.james.user.api.UsersRepository;
 import org.slf4j.Logger;
 
-import javax.annotation.PostConstruct;
-import javax.inject.Inject;
-import java.util.ArrayList;
-import java.util.List;
-
 public class ManageSieveServerFactory extends AbstractServerFactory {
 
     private FileSystem fileSystem;

Modified: james/project/trunk/server/protocols/protocols-pop3/pom.xml
URL: http://svn.apache.org/viewvc/james/project/trunk/server/protocols/protocols-pop3/pom.xml?rev=1722812&r1=1722811&r2=1722812&view=diff
==============================================================================
--- james/project/trunk/server/protocols/protocols-pop3/pom.xml (original)
+++ james/project/trunk/server/protocols/protocols-pop3/pom.xml Mon Jan  4 09:40:15 2016
@@ -28,7 +28,6 @@
         <relativePath>../../pom.xml</relativePath>
     </parent>
 
-    <groupId>org.apache.james</groupId>
     <artifactId>james-server-protocols-pop3</artifactId>
     <packaging>bundle</packaging>
 

Modified: james/project/trunk/server/protocols/protocols-pop3/src/main/java/org/apache/james/pop3server/netty/POP3ServerFactory.java
URL: http://svn.apache.org/viewvc/james/project/trunk/server/protocols/protocols-pop3/src/main/java/org/apache/james/pop3server/netty/POP3ServerFactory.java?rev=1722812&r1=1722811&r2=1722812&view=diff
==============================================================================
--- james/project/trunk/server/protocols/protocols-pop3/src/main/java/org/apache/james/pop3server/netty/POP3ServerFactory.java (original)
+++ james/project/trunk/server/protocols/protocols-pop3/src/main/java/org/apache/james/pop3server/netty/POP3ServerFactory.java Mon Jan  4 09:40:15 2016
@@ -31,7 +31,6 @@ public class POP3ServerFactory extends A
        return new POP3Server();
     }
     
-    @SuppressWarnings("unchecked")
     @Override
     protected List<AbstractConfigurableAsyncServer> createServers(Logger log, HierarchicalConfiguration config) throws Exception{
 

Modified: james/project/trunk/server/protocols/protocols-smtp/pom.xml
URL: http://svn.apache.org/viewvc/james/project/trunk/server/protocols/protocols-smtp/pom.xml?rev=1722812&r1=1722811&r2=1722812&view=diff
==============================================================================
--- james/project/trunk/server/protocols/protocols-smtp/pom.xml (original)
+++ james/project/trunk/server/protocols/protocols-smtp/pom.xml Mon Jan  4 09:40:15 2016
@@ -28,7 +28,6 @@
         <relativePath>../../pom.xml</relativePath>
     </parent>
 
-    <groupId>org.apache.james</groupId>
     <artifactId>james-server-protocols-smtp</artifactId>
     <packaging>bundle</packaging>
 

Modified: james/project/trunk/server/protocols/protocols-smtp/src/main/java/org/apache/james/smtpserver/DataLineJamesMessageHookHandler.java
URL: http://svn.apache.org/viewvc/james/project/trunk/server/protocols/protocols-smtp/src/main/java/org/apache/james/smtpserver/DataLineJamesMessageHookHandler.java?rev=1722812&r1=1722811&r2=1722812&view=diff
==============================================================================
--- james/project/trunk/server/protocols/protocols-smtp/src/main/java/org/apache/james/smtpserver/DataLineJamesMessageHookHandler.java (original)
+++ james/project/trunk/server/protocols/protocols-smtp/src/main/java/org/apache/james/smtpserver/DataLineJamesMessageHookHandler.java Mon Jan  4 09:40:15 2016
@@ -49,6 +49,7 @@ import org.apache.mailet.Mail;
 
 import javax.mail.MessagingException;
 import javax.mail.internet.AddressException;
+
 import java.io.IOException;
 import java.io.InputStream;
 import java.io.OutputStream;
@@ -94,6 +95,7 @@ public class DataLineJamesMessageHookHan
                 out.flush();
                 out.close();
 
+                @SuppressWarnings("unchecked")
                 List<MailAddress> recipientCollection = (List<MailAddress>) session.getAttachment(SMTPSession.RCPT_LIST, State.Transaction);
                 MailAddress mailAddress = (MailAddress) session.getAttachment(SMTPSession.SENDER, State.Transaction);
 
@@ -218,18 +220,19 @@ public class DataLineJamesMessageHookHan
         return null;
     }
 
+    @SuppressWarnings("unchecked")
     @Override
-    public void wireExtensions(Class interfaceName, List extension) throws WiringException {
+    public void wireExtensions(Class<?> interfaceName, List<?> extension) throws WiringException {
         if (JamesMessageHook.class.equals(interfaceName)) {
-            this.messageHandlers = extension;
+            this.messageHandlers = (List<JamesMessageHook>) extension;
             if (messageHandlers == null || messageHandlers.size() == 0) {
                 throw new WiringException("No messageHandler configured");
             }
         } else if (MessageHook.class.equals(interfaceName)) {
-            this.mHandlers = extension;
+            this.mHandlers = (List<MessageHook>) extension;
         } else if (HookResultHook.class.equals(interfaceName)) {
 
-            this.rHooks = extension;
+            this.rHooks = (List<HookResultHook>) extension;
         }
     }
 

Modified: james/project/trunk/server/protocols/protocols-smtp/src/main/java/org/apache/james/smtpserver/MailPriorityHandler.java
URL: http://svn.apache.org/viewvc/james/project/trunk/server/protocols/protocols-smtp/src/main/java/org/apache/james/smtpserver/MailPriorityHandler.java?rev=1722812&r1=1722811&r2=1722812&view=diff
==============================================================================
--- james/project/trunk/server/protocols/protocols-smtp/src/main/java/org/apache/james/smtpserver/MailPriorityHandler.java (original)
+++ james/project/trunk/server/protocols/protocols-smtp/src/main/java/org/apache/james/smtpserver/MailPriorityHandler.java Mon Jan  4 09:40:15 2016
@@ -50,7 +50,6 @@ public class MailPriorityHandler impleme
      * org.apache.james.smtpserver.JamesMessageHook#onMessage(org.apache.james.protocols.smtp.SMTPSession,
      *  org.apache.mailet.Mail)
      */
-    @SuppressWarnings("unchecked")
     public HookResult onMessage(SMTPSession session, Mail mail) {
         Iterator<MailAddress> rcpts = mail.getRecipients().iterator();
 
@@ -79,7 +78,6 @@ public class MailPriorityHandler impleme
         return new HookResult(HookReturnCode.DECLINED);
     }
 
-    @SuppressWarnings("unchecked")
     @Override
     public void init(Configuration config) throws ConfigurationException {
         List<HierarchicalConfiguration> entries = ((HierarchicalConfiguration)config).configurationsAt("priorityEntries.priorityEntry");

Modified: james/project/trunk/server/protocols/protocols-smtp/src/main/java/org/apache/james/smtpserver/fastfail/DNSRBLHandler.java
URL: http://svn.apache.org/viewvc/james/project/trunk/server/protocols/protocols-smtp/src/main/java/org/apache/james/smtpserver/fastfail/DNSRBLHandler.java?rev=1722812&r1=1722811&r2=1722812&view=diff
==============================================================================
--- james/project/trunk/server/protocols/protocols-smtp/src/main/java/org/apache/james/smtpserver/fastfail/DNSRBLHandler.java (original)
+++ james/project/trunk/server/protocols/protocols-smtp/src/main/java/org/apache/james/smtpserver/fastfail/DNSRBLHandler.java Mon Jan  4 09:40:15 2016
@@ -40,7 +40,6 @@ public class DNSRBLHandler extends org.a
         this.dns = dns;
     }
 
-    @SuppressWarnings("unchecked")
     @Override
     public void init(Configuration config) throws ConfigurationException {
         boolean validConfig = false;

Modified: james/project/trunk/server/protocols/protocols-smtp/src/main/java/org/apache/james/smtpserver/fastfail/ValidSenderDomainHandler.java
URL: http://svn.apache.org/viewvc/james/project/trunk/server/protocols/protocols-smtp/src/main/java/org/apache/james/smtpserver/fastfail/ValidSenderDomainHandler.java?rev=1722812&r1=1722811&r2=1722812&view=diff
==============================================================================
--- james/project/trunk/server/protocols/protocols-smtp/src/main/java/org/apache/james/smtpserver/fastfail/ValidSenderDomainHandler.java (original)
+++ james/project/trunk/server/protocols/protocols-smtp/src/main/java/org/apache/james/smtpserver/fastfail/ValidSenderDomainHandler.java Mon Jan  4 09:40:15 2016
@@ -21,7 +21,6 @@ package org.apache.james.smtpserver.fast
 import java.util.Collection;
 
 import javax.inject.Inject;
-import javax.inject.Named;
 
 import org.apache.commons.configuration.Configuration;
 import org.apache.commons.configuration.ConfigurationException;

Modified: james/project/trunk/server/protocols/protocols-smtp/src/main/java/org/apache/james/smtpserver/netty/SMTPServerFactory.java
URL: http://svn.apache.org/viewvc/james/project/trunk/server/protocols/protocols-smtp/src/main/java/org/apache/james/smtpserver/netty/SMTPServerFactory.java?rev=1722812&r1=1722811&r2=1722812&view=diff
==============================================================================
--- james/project/trunk/server/protocols/protocols-smtp/src/main/java/org/apache/james/smtpserver/netty/SMTPServerFactory.java (original)
+++ james/project/trunk/server/protocols/protocols-smtp/src/main/java/org/apache/james/smtpserver/netty/SMTPServerFactory.java Mon Jan  4 09:40:15 2016
@@ -57,7 +57,6 @@ public class SMTPServerFactory extends A
        return new SMTPServer();
     }
     
-    @SuppressWarnings("unchecked")
     @Override
     protected List<AbstractConfigurableAsyncServer> createServers(Logger log, HierarchicalConfiguration config) throws Exception{
         

Modified: james/project/trunk/server/protocols/protocols-smtp/src/test/java/org/apache/james/smtpserver/SMTPTestConfiguration.java
URL: http://svn.apache.org/viewvc/james/project/trunk/server/protocols/protocols-smtp/src/test/java/org/apache/james/smtpserver/SMTPTestConfiguration.java?rev=1722812&r1=1722811&r2=1722812&view=diff
==============================================================================
--- james/project/trunk/server/protocols/protocols-smtp/src/test/java/org/apache/james/smtpserver/SMTPTestConfiguration.java (original)
+++ james/project/trunk/server/protocols/protocols-smtp/src/test/java/org/apache/james/smtpserver/SMTPTestConfiguration.java Mon Jan  4 09:40:15 2016
@@ -19,7 +19,6 @@
 
 package org.apache.james.smtpserver;
 
-import org.apache.commons.configuration.ConfigurationException;
 import org.apache.commons.configuration.DefaultConfigurationBuilder;
 import org.apache.james.smtpserver.fastfail.*;
 

Modified: james/project/trunk/server/protocols/protocols-smtp/src/test/java/org/apache/james/smtpserver/SPFHandlerTest.java
URL: http://svn.apache.org/viewvc/james/project/trunk/server/protocols/protocols-smtp/src/test/java/org/apache/james/smtpserver/SPFHandlerTest.java?rev=1722812&r1=1722811&r2=1722812&view=diff
==============================================================================
--- james/project/trunk/server/protocols/protocols-smtp/src/test/java/org/apache/james/smtpserver/SPFHandlerTest.java (original)
+++ james/project/trunk/server/protocols/protocols-smtp/src/test/java/org/apache/james/smtpserver/SPFHandlerTest.java Mon Jan  4 09:40:15 2016
@@ -64,7 +64,7 @@ public class SPFHandlerTest {
         mockedDnsService = new DNSService() {
 
             @Override
-            public List getLocalDomainNames() {
+            public List<String> getLocalDomainNames() {
                 throw new UnsupportedOperationException("Unimplemented mock service");
             }
 
@@ -84,11 +84,11 @@ public class SPFHandlerTest {
             }
 
             @Override
-            public List getRecords(DNSRequest req) throws TimeoutException {
+            public List<String> getRecords(DNSRequest req) throws TimeoutException {
                 switch (req.getRecordType()) {
                     case DNSRequest.TXT:
                     case DNSRequest.SPF:
-                        List l = new ArrayList();
+                        List<String> l = new ArrayList<String>();
                         if (req.getHostname().equals("spf1.james.apache.org")) {
                             // pass
                             l.add("v=spf1 +all");
@@ -153,10 +153,6 @@ public class SPFHandlerTest {
                 }
             }
 
-            public String getRemoteIPAddress() {
-                return ip;
-            }
-
             @Override
             public boolean isRelayingAllowed() {
                 return relaying;

Modified: james/project/trunk/server/protocols/protocols-smtp/src/test/java/org/apache/james/smtpserver/SpamAssassinHandlerTest.java
URL: http://svn.apache.org/viewvc/james/project/trunk/server/protocols/protocols-smtp/src/test/java/org/apache/james/smtpserver/SpamAssassinHandlerTest.java?rev=1722812&r1=1722811&r2=1722812&view=diff
==============================================================================
--- james/project/trunk/server/protocols/protocols-smtp/src/test/java/org/apache/james/smtpserver/SpamAssassinHandlerTest.java (original)
+++ james/project/trunk/server/protocols/protocols-smtp/src/test/java/org/apache/james/smtpserver/SpamAssassinHandlerTest.java Mon Jan  4 09:40:15 2016
@@ -47,18 +47,8 @@ public class SpamAssassinHandlerTest {
 
             private final HashMap<String, Object> sstate = new HashMap<String, Object>();
             private final HashMap<String, Object> connectionState = new HashMap<String, Object>();
-            private final String ipAddress = "192.168.0.1";
-            private final String host = "localhost";
             private boolean relayingAllowed;
 
-            public String getRemoteHost() {
-                return host;
-            }
-
-            public String getRemoteIPAddress() {
-                return ipAddress;
-            }
-
             @Override
             public Object setAttachment(String key, Object value, State state) {
                 if (state == State.Connection) {

Modified: james/project/trunk/server/protocols/protocols-smtp/src/test/java/org/apache/james/smtpserver/URIRBLHandlerTest.java
URL: http://svn.apache.org/viewvc/james/project/trunk/server/protocols/protocols-smtp/src/test/java/org/apache/james/smtpserver/URIRBLHandlerTest.java?rev=1722812&r1=1722811&r2=1722812&view=diff
==============================================================================
--- james/project/trunk/server/protocols/protocols-smtp/src/test/java/org/apache/james/smtpserver/URIRBLHandlerTest.java (original)
+++ james/project/trunk/server/protocols/protocols-smtp/src/test/java/org/apache/james/smtpserver/URIRBLHandlerTest.java Mon Jan  4 09:40:15 2016
@@ -56,18 +56,8 @@ public class URIRBLHandlerTest {
         mockedMail = mail;
         SMTPSession mockedSMTPSession = new BaseFakeSMTPSession() {
 
-            private final String ipAddress = "192.168.0.1";
-            private final String host = "localhost";
             private boolean relayingAllowed;
 
-            public String getRemoteHost() {
-                return host;
-            }
-
-            public String getRemoteIPAddress() {
-                return ipAddress;
-            }
-
             private final HashMap<String, Object> sstate = new HashMap<String, Object>();
             private final HashMap<String, Object> connectionState = new HashMap<String, Object>();
 
@@ -151,8 +141,8 @@ public class URIRBLHandlerTest {
         DNSService mockedDnsServer = new MockDNSService() {
 
             @Override
-            public Collection findTXTRecords(String hostname) {
-                List res = new ArrayList();
+            public Collection<String> findTXTRecords(String hostname) {
+                List<String> res = new ArrayList<String>();
                 if (hostname == null) {
                     return res;
                 }
@@ -182,7 +172,7 @@ public class URIRBLHandlerTest {
     @Test
     public void testNotBlocked() throws IOException, MessagingException {
 
-        ArrayList servers = new ArrayList();
+        ArrayList<String> servers = new ArrayList<String>();
         servers.add(URISERVER);
 
         SMTPSession session = setupMockedSMTPSession(setupMockedMail(setupMockedMimeMessage(
@@ -200,7 +190,7 @@ public class URIRBLHandlerTest {
     @Test
     public void testBlocked() throws IOException, MessagingException {
 
-        ArrayList servers = new ArrayList();
+        ArrayList<String> servers = new ArrayList<String>();
         servers.add(URISERVER);
 
         SMTPSession session = setupMockedSMTPSession(setupMockedMail(setupMockedMimeMessage(
@@ -218,7 +208,7 @@ public class URIRBLHandlerTest {
     @Test
     public void testBlockedMultiPart() throws IOException, MessagingException {
 
-        ArrayList servers = new ArrayList();
+        ArrayList<String> servers = new ArrayList<String>();
         servers.add(URISERVER);
 
         SMTPSession session = setupMockedSMTPSession(setupMockedMail(setupMockedMimeMessageMP(

Modified: james/project/trunk/server/protocols/protocols-smtp/src/test/java/org/apache/james/smtpserver/ValidRcptMXTest.java
URL: http://svn.apache.org/viewvc/james/project/trunk/server/protocols/protocols-smtp/src/test/java/org/apache/james/smtpserver/ValidRcptMXTest.java?rev=1722812&r1=1722811&r2=1722812&view=diff
==============================================================================
--- james/project/trunk/server/protocols/protocols-smtp/src/test/java/org/apache/james/smtpserver/ValidRcptMXTest.java (original)
+++ james/project/trunk/server/protocols/protocols-smtp/src/test/java/org/apache/james/smtpserver/ValidRcptMXTest.java Mon Jan  4 09:40:15 2016
@@ -70,10 +70,6 @@ public class ValidRcptMXTest {
                     return sstate.get(key);
                 }
             }
-
-            public String getRemoteIPAddress() {
-                return "127.0.0.1";
-            }
         };
         return session;
     }
@@ -82,8 +78,8 @@ public class ValidRcptMXTest {
         DNSService dns = new MockDNSService() {
 
             @Override
-            public Collection findMXRecords(String hostname) {
-                Collection mx = new ArrayList();
+            public Collection<String> findMXRecords(String hostname) {
+                Collection<String> mx = new ArrayList<String>();
 
                 if (hostname.equals(INVALID_HOST)) {
                     mx.add(INVALID_MX);
@@ -107,7 +103,7 @@ public class ValidRcptMXTest {
 
     @Test
     public void testRejectLoopbackMX() throws ParseException, MailAddressException {
-        Collection bNetworks = new ArrayList();
+        Collection<String> bNetworks = new ArrayList<String>();
         bNetworks.add("127.0.0.1");
 
         DNSService dns = setupMockedDNSServer();

Modified: james/project/trunk/server/protocols/protocols-smtp/src/test/java/org/apache/james/smtpserver/mock/MockMimeMessage.java
URL: http://svn.apache.org/viewvc/james/project/trunk/server/protocols/protocols-smtp/src/test/java/org/apache/james/smtpserver/mock/MockMimeMessage.java?rev=1722812&r1=1722811&r2=1722812&view=diff
==============================================================================
--- james/project/trunk/server/protocols/protocols-smtp/src/test/java/org/apache/james/smtpserver/mock/MockMimeMessage.java (original)
+++ james/project/trunk/server/protocols/protocols-smtp/src/test/java/org/apache/james/smtpserver/mock/MockMimeMessage.java Mon Jan  4 09:40:15 2016
@@ -20,6 +20,8 @@ package org.apache.james.smtpserver.mock
 
 import java.io.*;
 import java.util.*;
+import java.util.Map.Entry;
+
 import javax.activation.DataHandler;
 import javax.mail.*;
 import javax.mail.internet.InternetAddress;
@@ -29,23 +31,23 @@ import javax.mail.search.SearchTerm;
 
 public class MockMimeMessage extends MimeMessage {
 
-    private final List m_fromAddresses = new ArrayList();
-    private Address m_senderAddress;
-    private final List m_toRecepients = new ArrayList();
-    private final List m_ccRecepients = new ArrayList();
-    private final List m_bccRecepients = new ArrayList();
-    private final List m_replyToAddresses = new ArrayList();
-    private String m_subject;
-    private int m_iMessageNumber;
-    private boolean m_bIsExpunged;
-    private Object m_content;
-    private Date m_sentDate;
-    private String[] m_contentLanguage;
-    private String m_fileName;
-    private DataHandler m_dataHandler;
-    private final HashMap m_contentHeaders = new HashMap();
-    private final Flags m_setFlags = new Flags();
-    private boolean m_doMatch;
+    private final List<Address> fromAddresses = new ArrayList<Address>();
+    private Address senderAddress;
+    private final List<Address> toRecepients = new ArrayList<Address>();
+    private final List<Address> ccRecepients = new ArrayList<Address>();
+    private final List<Address> bccRecepients = new ArrayList<Address>();
+    private final List<Address> replyToAddresses = new ArrayList<Address>();
+    private String subject;
+    private int messageNumber;
+    private boolean isExpunged;
+    private Object content;
+    private Date sentDate;
+    private String[] contentLanguage;
+    private String fileName;
+    private DataHandler dataHandler;
+    private final HashMap<String, String> contentHeaders = new HashMap<String, String>();
+    private final Flags setFlags = new Flags();
+    private boolean doMatch;
 
     public MockMimeMessage() {
         super((Session) null);
@@ -53,7 +55,7 @@ public class MockMimeMessage extends Mim
 
     public MockMimeMessage(int messageNumber) {
         super((Session) null);
-        m_iMessageNumber = messageNumber;
+        this.messageNumber = messageNumber;
     }
 
     public MockMimeMessage(MimeMessage mimeMessage) throws MessagingException {
@@ -62,67 +64,62 @@ public class MockMimeMessage extends Mim
 
     @Override
     public Address[] getFrom() throws MessagingException {
-        return (Address[]) m_fromAddresses.toArray();
+        return fromAddresses.toArray(new Address[0]);
     }
 
     @Override
     public void setFrom(Address address) throws MessagingException {
-        m_fromAddresses.clear();
-        m_fromAddresses.add(address);
+        fromAddresses.clear();
+        fromAddresses.add(address);
     }
 
     @Override
     public void setFrom() throws MessagingException {
-        m_fromAddresses.clear();
-        m_fromAddresses.add(InternetAddress.getLocalAddress(null));
+        fromAddresses.clear();
+        fromAddresses.add(InternetAddress.getLocalAddress(null));
     }
 
     @Override
     public void addFrom(Address[] addresses) throws MessagingException {
-        m_fromAddresses.add(addresses);
+        fromAddresses.addAll(Arrays.asList(addresses));
     }
 
     @Override
     public Address getSender() throws MessagingException {
-        return m_senderAddress;
+        return senderAddress;
     }
 
     @Override
     public void setSender(Address address) throws MessagingException {
-        m_senderAddress = address;
+        senderAddress = address;
     }
 
     @Override
     public Address[] getRecipients(Message.RecipientType recipientType) throws MessagingException {
-        List recipientsList = getRecipientsList(recipientType);
-        List recipientAddresses = new ArrayList();
-        for (Object aRecipientsList : recipientsList) {
-            String recipient = (String) aRecipientsList;
-            recipientAddresses.add(new InternetAddress(recipient));
-        }
-        return (Address[]) (recipientAddresses.toArray(new Address[recipientAddresses.size()]));
+        List<Address> recipientsList = getRecipientsList(recipientType);
+        return recipientsList.toArray(new Address[0]);
     }
 
-    private List getRecipientsList(Message.RecipientType recipientType) {
+    private List<Address> getRecipientsList(Message.RecipientType recipientType) {
         if (Message.RecipientType.TO.equals(recipientType)) {
-            return m_toRecepients;
+            return toRecepients;
         }
         if (Message.RecipientType.CC.equals(recipientType)) {
-            return m_ccRecepients;
+            return ccRecepients;
         }
         if (Message.RecipientType.BCC.equals(recipientType)) {
-            return m_bccRecepients;
+            return bccRecepients;
         }
         return null;
     }
 
     @Override
     public Address[] getAllRecipients() throws MessagingException {
-        List allRecipients = new ArrayList();
-        allRecipients.addAll(m_toRecepients);
-        allRecipients.addAll(m_ccRecepients);
-        allRecipients.addAll(m_bccRecepients);
-        return (Address[]) allRecipients.toArray();
+        List<Address> allRecipients = new ArrayList<Address>();
+        allRecipients.addAll(toRecepients);
+        allRecipients.addAll(ccRecepients);
+        allRecipients.addAll(bccRecepients);
+        return allRecipients.toArray(new Address[0]);
     }
 
     @Override
@@ -132,7 +129,7 @@ public class MockMimeMessage extends Mim
 
     @Override
     public void setRecipients(Message.RecipientType recipientType, String recipient) throws MessagingException {
-        getRecipientsList(recipientType).add(recipient);
+        setRecipients(recipientType, InternetAddress.parse(recipient));
     }
 
     @Override
@@ -142,37 +139,37 @@ public class MockMimeMessage extends Mim
 
     @Override
     public void addRecipients(Message.RecipientType recipientType, String recipient) throws MessagingException {
-        getRecipientsList(recipientType).add(recipient);
+        addRecipients(recipientType, InternetAddress.parse(recipient));
     }
 
     @Override
     public Address[] getReplyTo() throws MessagingException {
-        return (Address[]) m_replyToAddresses.toArray();
+        return replyToAddresses.toArray(new Address[0]);
     }
 
     @Override
     public void setReplyTo(Address[] addresses) throws MessagingException {
-        m_replyToAddresses.addAll(Arrays.asList(addresses));
+        replyToAddresses.addAll(Arrays.asList(addresses));
     }
 
     @Override
     public String getSubject() throws MessagingException {
-        return m_subject;
+        return subject;
     }
 
     @Override
     public void setSubject(String subject) throws MessagingException {
-        m_subject = subject;
+        this.subject = subject;
     }
 
     @Override
     public void setSubject(String subject, String charset) throws MessagingException {
         if (subject == null) {
-            m_subject = null;
+            this.subject = null;
             return;
         }
         try {
-            m_subject = new String(subject.getBytes(charset));
+            this.subject = new String(subject.getBytes(charset));
         } catch (UnsupportedEncodingException e) {
             throw new MessagingException("setting subject failed", e);
         }
@@ -180,12 +177,12 @@ public class MockMimeMessage extends Mim
 
     @Override
     public Date getSentDate() throws MessagingException {
-        return m_sentDate;
+        return sentDate;
     }
 
     @Override
     public void setSentDate(Date date) throws MessagingException {
-        m_sentDate = date;
+        sentDate = date;
     }
 
     @Override
@@ -269,27 +266,27 @@ public class MockMimeMessage extends Mim
 
     @Override
     public String[] getContentLanguage() throws MessagingException {
-        return m_contentLanguage;
+        return contentLanguage;
     }
 
     @Override
     public void setContentLanguage(String[] contentLanguage) throws MessagingException {
-        m_contentLanguage = contentLanguage;
+        this.contentLanguage = contentLanguage;
     }
 
     @Override
     public String getMessageID() throws MessagingException {
-        return "ID-" + m_iMessageNumber; // trivial implementation
+        return "ID-" + messageNumber; // trivial implementation
     }
 
     @Override
     public String getFileName() throws MessagingException {
-        return m_fileName;
+        return fileName;
     }
 
     @Override
     public void setFileName(String fileName) throws MessagingException {
-        m_fileName = fileName;
+        this.fileName = fileName;
     }
 
     @Override
@@ -304,30 +301,30 @@ public class MockMimeMessage extends Mim
 
     @Override
     public InputStream getRawInputStream() throws MessagingException {
-        if (m_content instanceof String) {
-            return new ByteArrayInputStream(m_content.toString().getBytes());
+        if (content instanceof String) {
+            return new ByteArrayInputStream(content.toString().getBytes());
         }
         throw new UnsupportedOperationException("Unimplementated method");
     }
 
     @Override
     public synchronized DataHandler getDataHandler() throws MessagingException {
-        return m_dataHandler;
+        return dataHandler;
     }
 
     @Override
     public synchronized void setDataHandler(DataHandler dataHandler) throws MessagingException {
-        m_dataHandler = dataHandler;
+        this.dataHandler = dataHandler;
     }
 
     @Override
     public Object getContent() throws IOException, MessagingException {
-        return m_content;
+        return content;
     }
 
     @Override
     public void setContent(Object object, String mimeType) throws MessagingException {
-        m_content = object; // trivial implementation
+        content = object; // trivial implementation
     }
 
     @Override
@@ -346,7 +343,7 @@ public class MockMimeMessage extends Mim
 
     @Override
     public void setContent(Multipart multipart) throws MessagingException {
-        m_content = multipart;
+        content = multipart;
     }
 
     @Override
@@ -366,7 +363,7 @@ public class MockMimeMessage extends Mim
 
     @Override
     public String[] getHeader(String name) throws MessagingException {
-        String value = (String) m_contentHeaders.get(name);
+        String value = (String) contentHeaders.get(name);
         if (value == null) {
             return null;
         }
@@ -389,22 +386,22 @@ public class MockMimeMessage extends Mim
 
     @Override
     public void addHeader(String name, String value) throws MessagingException {
-        m_contentHeaders.put(name, value);
+        contentHeaders.put(name, value);
     }
 
     @Override
     public void removeHeader(String name) throws MessagingException {
-        m_contentHeaders.remove(name);
+        contentHeaders.remove(name);
     }
 
     @Override
-    public Enumeration getAllHeaders() throws MessagingException {
-        return Collections.enumeration(m_contentHeaders.values());
+    public Enumeration<String> getAllHeaders() throws MessagingException {
+        return Collections.enumeration(contentHeaders.values());
     }
 
     @Override
-    public Enumeration getMatchingHeaders(String[] names) throws MessagingException {
-        ArrayList matchingHeaders = new ArrayList();
+    public Enumeration<String> getMatchingHeaders(String[] names) throws MessagingException {
+        ArrayList<String> matchingHeaders = new ArrayList<String>();
         for (String name : names) {
             String value = getHeader(name, null);
             if (value == null) {
@@ -416,13 +413,12 @@ public class MockMimeMessage extends Mim
     }
 
     @Override
-    public Enumeration getNonMatchingHeaders(String[] names) throws MessagingException {
-        List existingHeaders = Arrays.asList(names);
+    public Enumeration<String> getNonMatchingHeaders(String[] names) throws MessagingException {
+        List<String> existingHeaders = Arrays.asList(names);
 
-        ArrayList nonMatchingHeaders = new ArrayList();
+        ArrayList<String> nonMatchingHeaders = new ArrayList<String>();
 
-        for (Object o : m_contentHeaders.keySet()) {
-            String name = (String) o;
+        for (String name : contentHeaders.keySet()) {
             if (existingHeaders.contains(name)) {
                 continue;
             }
@@ -446,23 +442,21 @@ public class MockMimeMessage extends Mim
     }
 
     @Override
-    public Enumeration getAllHeaderLines() throws MessagingException {
-        return Collections.enumeration(getHeadersAsStrings(m_contentHeaders));
+    public Enumeration<String> getAllHeaderLines() throws MessagingException {
+        return Collections.enumeration(getHeadersAsStrings(contentHeaders));
     }
 
-    private ArrayList getHeadersAsStrings(HashMap contentHeaders) {
-        ArrayList headerLines = new ArrayList();
-        for (Object o : contentHeaders.keySet()) {
-            String key = (String) o;
-            String value = (String) contentHeaders.get(key);
-            headerLines.add(key + ":" + value);
+    private ArrayList<String> getHeadersAsStrings(HashMap<String, String> contentHeaders) {
+        ArrayList<String> headerLines = new ArrayList<String>();
+        for (Entry<String, String> entry : contentHeaders.entrySet()) {
+            headerLines.add(entry.getKey() + ":" + entry.getValue());
         }
         return headerLines;
     }
 
     @Override
-    public Enumeration getMatchingHeaderLines(String[] names) throws MessagingException {
-        ArrayList matchingHeaders = new ArrayList();
+    public Enumeration<String> getMatchingHeaderLines(String[] names) throws MessagingException {
+        ArrayList<String> matchingHeaders = new ArrayList<String>();
         for (String name : names) {
             String value = getHeader(name, null);
             if (value == null) {
@@ -474,13 +468,12 @@ public class MockMimeMessage extends Mim
     }
 
     @Override
-    public Enumeration getNonMatchingHeaderLines(String[] names) throws MessagingException {
-        List existingHeaders = names != null ? Arrays.asList(names) : null;
+    public Enumeration<String> getNonMatchingHeaderLines(String[] names) throws MessagingException {
+        List<String> existingHeaders = names != null ? Arrays.asList(names) : null;
 
-        ArrayList nonMatchingHeaders = new ArrayList();
+        ArrayList<String> nonMatchingHeaders = new ArrayList<String>();
 
-        for (Object o : m_contentHeaders.keySet()) {
-            String name = (String) o;
+        for (String name : contentHeaders.keySet()) {
             if (existingHeaders != null && existingHeaders.contains(name)) {
                 continue;
             }
@@ -495,20 +488,20 @@ public class MockMimeMessage extends Mim
 
     @Override
     public synchronized Flags getFlags() throws MessagingException {
-        return new Flags(m_setFlags);
+        return new Flags(setFlags);
     }
 
     @Override
     public synchronized boolean isSet(Flags.Flag flag) throws MessagingException {
-        return m_setFlags.contains(flag);
+        return setFlags.contains(flag);
     }
 
     @Override
     public synchronized void setFlags(Flags flags, boolean set) throws MessagingException {
         if (set) {
-            m_setFlags.add(flags);
+            setFlags.add(flags);
         } else {
-            m_setFlags.remove(flags);
+            setFlags.remove(flags);
         }
     }
 
@@ -540,20 +533,20 @@ public class MockMimeMessage extends Mim
     @Override
     public void setFlag(Flags.Flag flag, boolean set) throws MessagingException {
         if (set) {
-            m_setFlags.add(flag);
+            setFlags.add(flag);
         } else {
-            m_setFlags.remove(flag);
+            setFlags.remove(flag);
         }
     }
 
     @Override
     public int getMessageNumber() {
-        return m_iMessageNumber;
+        return messageNumber;
     }
 
     @Override
     protected void setMessageNumber(int i) {
-        m_iMessageNumber = i;
+        messageNumber = i;
     }
 
     @Override
@@ -563,20 +556,20 @@ public class MockMimeMessage extends Mim
 
     @Override
     public boolean isExpunged() {
-        return m_bIsExpunged;
+        return isExpunged;
     }
 
     @Override
     protected void setExpunged(boolean b) {
-        m_bIsExpunged = b;
+        isExpunged = b;
     }
 
     public void setShouldMatch(boolean doMatch) {
-        m_doMatch = doMatch;
+        this.doMatch = doMatch;
     }
 
     @Override
     public boolean match(SearchTerm searchTerm) throws MessagingException {
-        return m_doMatch;
+        return doMatch;
     }
 }

Modified: james/project/trunk/server/protocols/protocols-smtp/src/test/java/org/apache/james/smtpserver/mock/mailet/MockMail.java
URL: http://svn.apache.org/viewvc/james/project/trunk/server/protocols/protocols-smtp/src/test/java/org/apache/james/smtpserver/mock/mailet/MockMail.java?rev=1722812&r1=1722811&r2=1722812&view=diff
==============================================================================
--- james/project/trunk/server/protocols/protocols-smtp/src/test/java/org/apache/james/smtpserver/mock/mailet/MockMail.java (original)
+++ james/project/trunk/server/protocols/protocols-smtp/src/test/java/org/apache/james/smtpserver/mock/mailet/MockMail.java Mon Jan  4 09:40:15 2016
@@ -20,21 +20,23 @@ package org.apache.james.smtpserver.mock
 
 import java.io.Serializable;
 import java.util.*;
+
 import javax.mail.MessagingException;
 import javax.mail.internet.MimeMessage;
+
 import org.apache.mailet.Mail;
 import org.apache.mailet.MailAddress;
 
 public class MockMail implements Mail {
 
     private MimeMessage msg = null;
-    private Collection recipients = new ArrayList();
+    private Collection<MailAddress> recipients = new ArrayList<MailAddress>();
     private String name = null;
     private final MailAddress sender = null;
     private String state = null;
     private String errorMessage;
     private Date lastUpdated;
-    private final HashMap attributes = new HashMap();
+    private final HashMap<String, Serializable> attributes = new HashMap<String, Serializable>();
     private static final long serialVersionUID = 1L;
     private long size = 0;
     private String remoteAddr = "127.0.0.1";
@@ -55,12 +57,12 @@ public class MockMail implements Mail {
     }
 
     @Override
-    public Collection getRecipients() {
+    public Collection<MailAddress> getRecipients() {
         return recipients;
     }
 
     @Override
-    public void setRecipients(Collection recipients) {
+    public void setRecipients(Collection<MailAddress> recipients) {
         this.recipients = recipients;
     }
 
@@ -110,7 +112,7 @@ public class MockMail implements Mail {
     }
 
     @Override
-    public Iterator getAttributeNames() {
+    public Iterator<String> getAttributeNames() {
         return attributes.keySet().iterator();
     }
 

Modified: james/project/trunk/server/protocols/protocols-smtp/src/test/java/org/apache/james/smtpserver/mock/mailet/MockMailContext.java
URL: http://svn.apache.org/viewvc/james/project/trunk/server/protocols/protocols-smtp/src/test/java/org/apache/james/smtpserver/mock/mailet/MockMailContext.java?rev=1722812&r1=1722811&r2=1722812&view=diff
==============================================================================
--- james/project/trunk/server/protocols/protocols-smtp/src/test/java/org/apache/james/smtpserver/mock/mailet/MockMailContext.java (original)
+++ james/project/trunk/server/protocols/protocols-smtp/src/test/java/org/apache/james/smtpserver/mock/mailet/MockMailContext.java Mon Jan  4 09:40:15 2016
@@ -22,18 +22,19 @@ import java.util.Collection;
 import java.util.HashMap;
 import java.util.Iterator;
 import java.util.List;
+
 import javax.mail.MessagingException;
 import javax.mail.internet.MimeMessage;
 
+import org.apache.mailet.HostAddress;
 import org.apache.mailet.LookupException;
 import org.apache.mailet.Mail;
 import org.apache.mailet.MailAddress;
 import org.apache.mailet.MailetContext;
-import org.apache.mailet.TemporaryLookupException;
 
 public class MockMailContext implements MailetContext {
 
-    final HashMap attributes = new HashMap();
+    final HashMap<String, Object> attributes = new HashMap<String, Object>();
 
     @Override
     public void bounce(Mail mail, String message) throws MessagingException {
@@ -51,7 +52,7 @@ public class MockMailContext implements
     }
 
     @Override
-    public Collection getMailServers(String host) {
+    public Collection<String> getMailServers(String host) {
         return null; // trivial implementation
     }
 
@@ -66,7 +67,7 @@ public class MockMailContext implements
     }
 
     @Override
-    public Iterator getAttributeNames() {
+    public Iterator<String> getAttributeNames() {
         return attributes.keySet().iterator();
     }
 
@@ -132,12 +133,12 @@ public class MockMailContext implements
     }
 
     @Override
-    public void sendMail(MailAddress sender, Collection recipients, MimeMessage msg) throws MessagingException {
+    public void sendMail(MailAddress sender, Collection<MailAddress> recipients, MimeMessage msg) throws MessagingException {
         throw new UnsupportedOperationException("MOCKed method");
     }
 
     @Override
-    public void sendMail(MailAddress sender, Collection recipients, MimeMessage msg, String state) throws
+    public void sendMail(MailAddress sender, Collection<MailAddress> recipients, MimeMessage msg, String state) throws
             MessagingException {
         throw new UnsupportedOperationException("MOCKed method");
     }
@@ -153,7 +154,7 @@ public class MockMailContext implements
     }
 
     @Override
-    public Iterator getSMTPHostAddresses(String domainName) {
+    public Iterator<HostAddress> getSMTPHostAddresses(String domainName) {
         return null; // trivial implementation
     }
 }

Modified: james/project/trunk/server/protocols/protocols-smtp/src/test/java/org/apache/james/smtpserver/mock/mailet/MockMailetConfig.java
URL: http://svn.apache.org/viewvc/james/project/trunk/server/protocols/protocols-smtp/src/test/java/org/apache/james/smtpserver/mock/mailet/MockMailetConfig.java?rev=1722812&r1=1722811&r2=1722812&view=diff
==============================================================================
--- james/project/trunk/server/protocols/protocols-smtp/src/test/java/org/apache/james/smtpserver/mock/mailet/MockMailetConfig.java (original)
+++ james/project/trunk/server/protocols/protocols-smtp/src/test/java/org/apache/james/smtpserver/mock/mailet/MockMailetConfig.java Mon Jan  4 09:40:15 2016
@@ -49,8 +49,8 @@ public class MockMailetConfig extends Pr
     }
 
     @Override
-    public Iterator getInitParameterNames() {
-        return keySet().iterator();
+    public Iterator<String> getInitParameterNames() {
+        return stringPropertyNames().iterator();
     }
 
     @Override

Modified: james/project/trunk/server/queue/queue-activemq/pom.xml
URL: http://svn.apache.org/viewvc/james/project/trunk/server/queue/queue-activemq/pom.xml?rev=1722812&r1=1722811&r2=1722812&view=diff
==============================================================================
--- james/project/trunk/server/queue/queue-activemq/pom.xml (original)
+++ james/project/trunk/server/queue/queue-activemq/pom.xml Mon Jan  4 09:40:15 2016
@@ -28,7 +28,6 @@
         <relativePath>../../pom.xml</relativePath>
     </parent>
 
-    <groupId>org.apache.james</groupId>
     <artifactId>james-server-queue-activemq</artifactId>
     <packaging>bundle</packaging>
 

Modified: james/project/trunk/server/queue/queue-api/pom.xml
URL: http://svn.apache.org/viewvc/james/project/trunk/server/queue/queue-api/pom.xml?rev=1722812&r1=1722811&r2=1722812&view=diff
==============================================================================
--- james/project/trunk/server/queue/queue-api/pom.xml (original)
+++ james/project/trunk/server/queue/queue-api/pom.xml Mon Jan  4 09:40:15 2016
@@ -28,7 +28,6 @@
         <relativePath>../../pom.xml</relativePath>
     </parent>
 
-    <groupId>org.apache.james</groupId>
     <artifactId>james-server-queue-api</artifactId>
     <packaging>bundle</packaging>
 

Modified: james/project/trunk/server/queue/queue-file/src/main/java/org/apache/james/queue/file/FileMailQueueFactory.java
URL: http://svn.apache.org/viewvc/james/project/trunk/server/queue/queue-file/src/main/java/org/apache/james/queue/file/FileMailQueueFactory.java?rev=1722812&r1=1722811&r2=1722812&view=diff
==============================================================================
--- james/project/trunk/server/queue/queue-file/src/main/java/org/apache/james/queue/file/FileMailQueueFactory.java (original)
+++ james/project/trunk/server/queue/queue-file/src/main/java/org/apache/james/queue/file/FileMailQueueFactory.java Mon Jan  4 09:40:15 2016
@@ -24,7 +24,6 @@ import org.apache.james.queue.api.MailQu
 import org.apache.james.queue.api.MailQueueFactory;
 import org.slf4j.Logger;
 
-import javax.annotation.Resource;
 import javax.inject.Inject;
 
 import java.io.IOException;

Modified: james/project/trunk/server/queue/queue-jms/pom.xml
URL: http://svn.apache.org/viewvc/james/project/trunk/server/queue/queue-jms/pom.xml?rev=1722812&r1=1722811&r2=1722812&view=diff
==============================================================================
--- james/project/trunk/server/queue/queue-jms/pom.xml (original)
+++ james/project/trunk/server/queue/queue-jms/pom.xml Mon Jan  4 09:40:15 2016
@@ -28,7 +28,6 @@
         <relativePath>../../pom.xml</relativePath>
     </parent>
 
-    <groupId>org.apache.james</groupId>
     <artifactId>james-server-queue-jms</artifactId>
     <packaging>bundle</packaging>
 

Modified: james/project/trunk/server/queue/queue-jms/src/main/java/org/apache/james/queue/jms/JMSMailQueue.java
URL: http://svn.apache.org/viewvc/james/project/trunk/server/queue/queue-jms/src/main/java/org/apache/james/queue/jms/JMSMailQueue.java?rev=1722812&r1=1722811&r2=1722812&view=diff
==============================================================================
--- james/project/trunk/server/queue/queue-jms/src/main/java/org/apache/james/queue/jms/JMSMailQueue.java (original)
+++ james/project/trunk/server/queue/queue-jms/src/main/java/org/apache/james/queue/jms/JMSMailQueue.java Mon Jan  4 09:40:15 2016
@@ -284,7 +284,6 @@ public class JMSMailQueue implements Man
      * @throws JMSException
      * @throws MessagingException
      */
-    @SuppressWarnings("unchecked")
     protected Map<String, Object> getJMSProperties(Mail mail, long delayInMillis) throws MessagingException {
         Map<String, Object> props = new HashMap<String, Object>();
         long nextDelivery = -1;

Modified: james/project/trunk/server/queue/queue-jms/src/main/java/org/apache/james/queue/library/MailQueueManagement.java
URL: http://svn.apache.org/viewvc/james/project/trunk/server/queue/queue-jms/src/main/java/org/apache/james/queue/library/MailQueueManagement.java?rev=1722812&r1=1722811&r2=1722812&view=diff
==============================================================================
--- james/project/trunk/server/queue/queue-jms/src/main/java/org/apache/james/queue/library/MailQueueManagement.java (original)
+++ james/project/trunk/server/queue/queue-jms/src/main/java/org/apache/james/queue/library/MailQueueManagement.java Mon Jan  4 09:40:15 2016
@@ -110,13 +110,12 @@ public class MailQueueManagement extends
     }
 
     @Override
-    @SuppressWarnings("unchecked")
     public List<CompositeData> browse() throws Exception {
         MailQueueIterator it = queue.browse();
         List<CompositeData> data = new ArrayList<CompositeData>();
         String[] names = new String[]{"name", "sender", "state", "recipients", "size", "lastUpdated", "remoteAddress", "remoteHost", "errorMessage", "attributes", "nextDelivery"};
         String[] descs = new String[]{"Unique name", "Sender", "Current state", "Recipients", "Size in bytes", "Timestamp of last update", "IPAddress of the sender", "Hostname of the sender", "Errormessage if any", "Attributes stored", "Timestamp of when the next delivery attempt will be make"};
-        OpenType[] types = new OpenType[]{SimpleType.STRING, SimpleType.STRING, SimpleType.STRING, SimpleType.STRING, SimpleType.LONG, SimpleType.LONG, SimpleType.STRING, SimpleType.STRING, SimpleType.STRING, SimpleType.STRING, SimpleType.LONG};
+        OpenType<?>[] types = new OpenType<?>[]{SimpleType.STRING, SimpleType.STRING, SimpleType.STRING, SimpleType.STRING, SimpleType.LONG, SimpleType.LONG, SimpleType.STRING, SimpleType.STRING, SimpleType.STRING, SimpleType.STRING, SimpleType.LONG};
 
         while (it.hasNext()) {
 



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