Skip to content

Commit

Permalink
Merge pull request akara#36 from shanti/delfix
Browse files Browse the repository at this point in the history
Fix for Issue: "After a delete run, tag search throws exception"
  • Loading branch information
shanti committed Jun 21, 2012
2 parents 0492df8 + 232c3ab commit 6c60813
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 3 deletions.
11 changes: 10 additions & 1 deletion harness/src/com/sun/faban/harness/webclient/ResultAction.java
Expand Up @@ -461,12 +461,21 @@ public String archive(HttpServletRequest request,
}

public String deleteResults(HttpServletRequest request,
HttpServletResponse response) {
HttpServletResponse response) throws IOException {
String[] runIds = request.getParameterValues("select");
if (runIds != null) {
TagEngine tagEngine;
try {
tagEngine = TagEngine.getInstance();
} catch (ClassNotFoundException ex) {
logger.log(Level.SEVERE, "Cannot find tag engine class", ex);
throw new IOException("Cannot find tag engine class", ex);
}
for (String r : runIds) {
RunResult runResult = RunResult.getInstance(new RunId(r));
runResult.delete(r);
tagEngine.removeRun(r);
tagEngine.save();
}
}
HttpSession session = request.getSession();
Expand Down
4 changes: 2 additions & 2 deletions harness/src/com/sun/faban/harness/webclient/RunResult.java
Expand Up @@ -403,8 +403,8 @@ public static SortableTableModel getResultTable(Subject user, String tags,
} catch (Exception e) {
logger.log(Level.WARNING, "Cannot remove run " + runid, e);
}
}
resultList.add(res);
} else
resultList.add(res);
} catch (Exception e) {
logger.log(Level.WARNING, "Cannot read result dir " + runid, e);
}
Expand Down

0 comments on commit 6c60813

Please sign in to comment.