Skip to content
This repository has been archived by the owner. It is now read-only.
Permalink
Browse files
[FIXED JENKINS-10627] Abort tasks scanning if user pressed cancel.
  • Loading branch information
uhafner committed Aug 19, 2011
1 parent ac5772d commit 5c2a29ce6c313ad9cfc0936ecd962801fa89e0e2
Showing with 5 additions and 1 deletion.
  1. +5 −1 src/main/java/hudson/plugins/tasks/parser/WorkspaceScanner.java
@@ -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);
@@ -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;

0 comments on commit 5c2a29c

Please sign in to comment.