james-server-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Darrell DeBoer <darrell.deb...@mathiasco.co.uk>
Subject [PATCH] Fix to AvalonListServManager
Date Mon, 06 Aug 2001 09:31:46 GMT
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


Mime
View raw message