selectRS = selectStmt.executeQuery();
List<String> nets = new ArrayList<String>();
while (selectRS.next()) {
nets.add(selectRS.getString(1));
}
NetMatcher matcher = new NetMatcher(nets, dns);
boolean matched = matcher.matchInetNetwork(mail.getRemoteAddr());
if (matched == false) {
selectStmt = conn.prepareStatement(selectNetworks);
selectStmt.setString(1, "*");
selectStmt.setString(2, recipientHost);
selectRS = selectStmt.executeQuery();
nets = new ArrayList<String>();
while (selectRS.next()) {
nets.add(selectRS.getString(1));
}
matcher = new NetMatcher(nets, dns);
matched = matcher.matchInetNetwork(mail.getRemoteAddr());
}
return matched;
} finally {
theJDBCUtil.closeJDBCResultSet(selectRS);
}