Skip to content
This repository has been archived by the owner on Apr 6, 2022. It is now read-only.

Commit

Permalink
[FIXED JENKINS-10627] Abort tasks scanning if user pressed cancel.
Browse files Browse the repository at this point in the history
  • Loading branch information
uhafner committed Aug 19, 2011
1 parent ac5772d commit 5c2a29c
Showing 1 changed file with 5 additions and 1 deletion.
Expand Up @@ -129,7 +129,7 @@ public String getPrefix() {
}

/** {@inheritDoc} */
public TasksParserResult invoke(final File workspace, final VirtualChannel channel) throws IOException {
public TasksParserResult invoke(final File workspace, final VirtualChannel channel) throws IOException, InterruptedException {
String[] files = findFiles(workspace);

TaskScanner taskScanner = new TaskScanner(high, normal, low, ignoreCase);
Expand Down Expand Up @@ -157,6 +157,10 @@ public TasksParserResult invoke(final File workspace, final VirtualChannel chann

javaProject.addAnnotations(tasks);
}

if (Thread.interrupted()) {
throw new InterruptedException("Canceling scanning since build has been aborted.");
}
}

return javaProject;
Expand Down

0 comments on commit 5c2a29c

Please sign in to comment.