assert (id != -1) : "Id was not set";
Report report = em.find(Report.class, id);
if (report == null) {
//workaround for old links from issuezilla
if (id < 146000) {
Exceptions exc = em.find(Exceptions.class, id);
if (exc == null) {
LOG.log(Level.SEVERE, "Unable to find Exceptions.id = " + id);
request.setAttribute("error", "Exception #" + id + "doesn't exist");
return mapping.findForward(ERROR);
}
report = exc.getReportId();
} else {
Logger.getLogger(ReportDetailAction.class.getName()).warning("Cannot find report instance with id " + id);
response.setHeader("Refresh", "30"); // refresh the page in 30s
return mapping.findForward(PLEASE_WAIT);
}