Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorsminto2005-07-20 21:27:20 +0000
committersminto2005-07-20 21:27:20 +0000
commit1664a449d0f15f2c08d09dc897525028816c5067 (patch)
tree48694e5d51a6f3a83b8cb77660ae6374e34b8702 /org.eclipse.mylyn.bugzilla.core/src
parent1885b19080f19b18d43b132b7581225ccdae3b7c (diff)
downloadorg.eclipse.mylyn.tasks-1664a449d0f15f2c08d09dc897525028816c5067.tar.gz
org.eclipse.mylyn.tasks-1664a449d0f15f2c08d09dc897525028816c5067.tar.xz
org.eclipse.mylyn.tasks-1664a449d0f15f2c08d09dc897525028816c5067.zip
Fix for Bug #104084: active search jobs should be terminated before shutdown
Diffstat (limited to 'org.eclipse.mylyn.bugzilla.core/src')
-rw-r--r--org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/bugzilla/core/search/BugzillaSearchEngine.java19
1 files changed, 19 insertions, 0 deletions
diff --git a/org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/bugzilla/core/search/BugzillaSearchEngine.java b/org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/bugzilla/core/search/BugzillaSearchEngine.java
index 45788e55a..bfeb9dfb4 100644
--- a/org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/bugzilla/core/search/BugzillaSearchEngine.java
+++ b/org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/bugzilla/core/search/BugzillaSearchEngine.java
@@ -152,11 +152,23 @@ public class BugzillaSearchEngine {
throw new BugzillaException(msg);
}
+ if (monitor.isCanceled()) {
+ throw new OperationCanceledException("Search cancelled");
+ }
+
in = new BufferedReader(new InputStreamReader(connect.getInputStream()));
+ if (monitor.isCanceled()) {
+ throw new OperationCanceledException("Search cancelled");
+ }
+
Match match = new Match();
String line;
while ((line = in.readLine()) != null) {
+ if (monitor.isCanceled()) {
+ throw new OperationCanceledException("Search cancelled");
+ }
+
// create regular expressions that can be mathced to check if we have
// bad login information
RegularExpression loginRe = new RegularExpression("<title>.*login.*</title>.*");
@@ -199,7 +211,13 @@ public class BugzillaSearchEngine {
String state = null;
String result = null;
for (int i = 0; i < 6; i++) {
+ if (monitor.isCanceled()) {
+ throw new OperationCanceledException("Search cancelled");
+ }
do {
+ if (monitor.isCanceled()) {
+ throw new OperationCanceledException("Search cancelled");
+ }
line = in.readLine().trim();
if (line == null) break;
line = line.trim();
@@ -254,6 +272,7 @@ public class BugzillaSearchEngine {
BugzillaPlugin.log(status);
}
catch (OperationCanceledException e) {
+ e.printStackTrace();
status = new Status(IStatus.CANCEL, IBugzillaConstants.PLUGIN_ID,
IStatus.CANCEL, "", null);
}catch (Exception e) {

Back to the top