List<Address> results = null;
Session session = null;
Query query;
try {
session = DaoUtils.getSession();
<BUG>if (session != null) {
if (names != null && names.size() > 0) {
</BUG>
query = session.getNamedQuery("getAddress");
query.setParameterList("emailList", names);

List<Address> results = null;
Session session = null;
Query query;
try {
session = DaoUtils.getSession();
if (names != null && !names.isEmpty()) {
query = session.getNamedQuery("getAddress");
query.setParameterList("emailList", names);
