Transaction tx = null;
Query query;
int count = 0;
try {
session = DaoUtils.getSession();
<BUG>if (session != null) {</BUG>
tx = session.beginTransaction();
query = session.createQuery("DELETE FROM Address a WHERE UPPER(a.emailAddress) = :emailAddress");
query.setParameter("emailAddress", name.toUpperCase(Locale.getDefault()));
count = query.executeUpdate();
tx.commit();
<BUG>}</BUG>
} catch (Exception e) {

Transaction tx = null;
Query query;
int count = 0;
try {
session = DaoUtils.getSession();
tx = session.beginTransaction();
query = session.createQuery("DELETE FROM Address a WHERE UPPER(a.emailAddress) = :emailAddress");
query.setParameter("emailAddress", name.toUpperCase(Locale.getDefault()));
count = query.executeUpdate();
