james-server-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From e...@apache.org
Subject svn commit: r1228105 - /james/server/trunk/pop3server/src/main/java/org/apache/james/pop3server/core/JamesPassCmdHandler.java
Date Fri, 06 Jan 2012 11:27:18 GMT
Author: eric
Date: Fri Jan  6 11:27:18 2012
New Revision: 1228105

URL: http://svn.apache.org/viewvc?rev=1228105&view=rev
Log:
This class needs to be fixed, it doesn't fullfill what's excepted when loded via spring (JAMES-1360)

Modified:
    james/server/trunk/pop3server/src/main/java/org/apache/james/pop3server/core/JamesPassCmdHandler.java

Modified: james/server/trunk/pop3server/src/main/java/org/apache/james/pop3server/core/JamesPassCmdHandler.java
URL: http://svn.apache.org/viewvc/james/server/trunk/pop3server/src/main/java/org/apache/james/pop3server/core/JamesPassCmdHandler.java?rev=1228105&r1=1228104&r2=1228105&view=diff
==============================================================================
--- james/server/trunk/pop3server/src/main/java/org/apache/james/pop3server/core/JamesPassCmdHandler.java
(original)
+++ james/server/trunk/pop3server/src/main/java/org/apache/james/pop3server/core/JamesPassCmdHandler.java
Fri Jan  6 11:27:18 2012
@@ -18,8 +18,6 @@
  ****************************************************************/
 package org.apache.james.pop3server.core;
 
-import javax.annotation.Resource;
-
 import org.apache.james.protocols.api.Request;
 import org.apache.james.protocols.api.Response;
 import org.apache.james.protocols.lib.POP3BeforeSMTPHelper;
@@ -35,16 +33,20 @@ import org.apache.james.protocols.pop3.m
  */
 public class JamesPassCmdHandler extends PassCmdHandler {
 
-    @Resource(name = "mailboxfactory")
-    public void setMailboxFactory(MailboxFactory factory) {
-        super.setMailboxFactory(factory);
+    // TODO Check that this constructor is correctly called and can replace the mailboxfactory
injection
+    public JamesPassCmdHandler(MailboxFactory factory) {
+        super(factory);
     }
+//    @Resource(name = "mailboxfactory")
+//    public void setMailboxFactory(MailboxFactory factory) {
+//        super.setMailboxFactory(factory);
+//    }
 
     @Override
     public Response onCommand(POP3Session session, Request request) {
         Response response =  super.onCommand(session, request);
         if (POP3Response.OK_RESPONSE.equals(response.getRetCode())) {
-            POP3BeforeSMTPHelper.addIPAddress(session.getRemoteIPAddress());
+            POP3BeforeSMTPHelper.addIPAddress(session.getRemoteAddress().getAddress().toString());
         }
         return response;
     }



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