Collection tmpMembers = new Vector();
while (rs.next()) {
String address = rs.getString(1);
System.out.println(address);
try {
MailAddress mailAddress = new MailAddress(address);
tmpMembers.add(mailAddress);
} catch (ParseException pe) {
//don't stop... just log and continue
log("error parsing address '" + address + "' in listserv '" + listservAddress + "'");
}
}
members = tmpMembers;
rs.close();
stmt.close();
stmt = conn.prepareStatement(listservQuery);
stmt.setString(1, listservAddress.toString());
rs = stmt.executeQuery();
if (!rs.next()) {
throw new MailetException("Could not find listserv record for '" + listservAddress + "'");
}
membersOnly = rs.getBoolean("members_only");
attachmentsAllowed = rs.getBoolean("attachments_allowed");
replyToList = rs.getBoolean("reply_to_list");
subjectPrefix = rs.getString("subject_prefix");
String address = rs.getString("list_address");
if (address == null) {
listservAddress = null;
} else {
try {
listservAddress = new MailAddress(address);
} catch (ParseException pe) {
//log and ignore
log("invalid listserv address '" + listservAddress + "' for listserv '" + listservAddress + "'");
listservAddress = null;
}