Utils.processPersistable(new Persistable.Query() {
public TransactionResult runQuery(EntityManager em) {
StackTraceElement element = new StackTraceElement(className, methodName, null, 0);
Matcher matcher = Matcher.getDefault();
Component comp = matcher.match(em, new StackTraceElement[]{element});
register(request, comp);
return TransactionResult.NONE;
}
});
}
final String issueIdStr = request.getParameter("issue_id");
if (issueIdStr != null){
Utils.processPersistable(new Persistable.Query() {
public TransactionResult runQuery(EntityManager em) {
Integer issueId = Integer.parseInt(issueIdStr);
Matcher match = Matcher.getDefault();
Submit sbm = Submit.getById(em, issueId);
if(sbm == null){
register(request, new Component("non existing submit with id", issueId.toString()));
}else{
Component comp;
if (sbm instanceof Exceptions) {
comp = match.match(em, ((Exceptions)sbm).getMockThrowable());
}else{
SlownessChecker checker = new SlownessChecker(em, null, sbm.getLogfileId());
comp = checker.getComponentForSlowness();