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 Darrell DeBoer <da...@mathiasco.co.uk> on 2001/08/06 11:31:46 UTC

[PATCH] Fix to AvalonListServManager

G'day

Just a little fix to o.a.j.transport.mailets.AvalonListServManager, to use 
the newer "addUser(User)" method on UsersRepository. This will enable the 
AvalonListServManager to work with the UsersJdbcRepository (with the recent 
patch).

I think the old addUser(String, Object) method should have been deprecated 
(As of 1.2.2), but wasn't. (All of the other methods using "Object 
attributes" have been deprecated.)

ciao
Daz

Index: AvalonListservManager.java
===================================================================
RCS file: 
/home/cvspublic/jakarta-james/src/java/org/apache/james/transport/mailets/AvalonListservManager.java,v
retrieving revision 1.2
diff -u -r1.2 AvalonListservManager.java
--- AvalonListservManager.java  2001/06/24 13:18:36     1.2
+++ AvalonListservManager.java  2001/08/06 09:14:38
@@ -15,6 +15,8 @@
 import org.apache.james.*;
 import org.apache.james.services.UsersRepository;
 import org.apache.james.services.UsersStore;
+import org.apache.james.services.User;
+import org.apache.james.userrepository.DefaultUser;
 import org.apache.james.transport.*;
 import org.apache.mailet.*;
 
@@ -49,7 +51,8 @@
     }
 
     public boolean addAddress(MailAddress address) {
-        members.addUser(address.toString(), "");
+        User listMember = new DefaultUser(address.toString(), "none");
+        members.addUser(listMember);
         return true;
     }

---------------------------------------------------------------------
To unsubscribe, e-mail: james-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: james-dev-help@jakarta.apache.org