Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorrelves2006-12-06 02:24:39 +0000
committerrelves2006-12-06 02:24:39 +0000
commitcad5e4eff5d165b8aab2fb06beade0ee6699517d (patch)
treeb9fc0ee679f9766d846fae37956363da35ba288b
parent4c225e9e2b48ed9b6c85eb6a3097bf39906a9126 (diff)
downloadorg.eclipse.mylyn.tasks-cad5e4eff5d165b8aab2fb06beade0ee6699517d.tar.gz
org.eclipse.mylyn.tasks-cad5e4eff5d165b8aab2fb06beade0ee6699517d.tar.xz
org.eclipse.mylyn.tasks-cad5e4eff5d165b8aab2fb06beade0ee6699517d.zip
NEW - bug 166693: Bugzilla mid-air collision errors should not be dumped to the log
https://bugs.eclipse.org/bugs/show_bug.cgi?id=166693
-rw-r--r--org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/BugzillaClient.java4
-rw-r--r--org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/BugzillaTaskDataHandler.java3
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/editors/AbstractRepositoryTaskEditor.java4
3 files changed, 7 insertions, 4 deletions
diff --git a/org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/BugzillaClient.java b/org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/BugzillaClient.java
index 4797eddb3..3dba46d23 100644
--- a/org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/BugzillaClient.java
+++ b/org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/BugzillaClient.java
@@ -977,8 +977,8 @@ public class BugzillaClient {
// MylarStatusHandler.log("Login Error: "+body,
// BugzillaServerFacade.class);
throw new LoginException(IBugzillaConstants.ERROR_INVALID_USERNAME_OR_PASSWORD);
- } else if (title.indexOf(IBugzillaConstants.ERROR_MIDAIR_COLLISION) != -1) {
- throw new BugzillaException(IBugzillaConstants.ERROR_MSG_MIDAIR_COLLISION);
+// } else if (title.indexOf(IBugzillaConstants.ERROR_MIDAIR_COLLISION) != -1) {
+// throw new BugzillaException(IBugzillaConstants.ERROR_MSG_MIDAIR_COLLISION);
} else if (title.indexOf(IBugzillaConstants.ERROR_COMMENT_REQUIRED) != -1) {
throw new BugzillaException(IBugzillaConstants.ERROR_MSG_COMMENT_REQUIRED);
} else if (title.indexOf(IBugzillaConstants.LOGGED_OUT) != -1) {
diff --git a/org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/BugzillaTaskDataHandler.java b/org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/BugzillaTaskDataHandler.java
index 0d4f3778f..2f00e0a02 100644
--- a/org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/BugzillaTaskDataHandler.java
+++ b/org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/BugzillaTaskDataHandler.java
@@ -143,6 +143,9 @@ public class BugzillaTaskDataHandler implements ITaskDataHandler {
try {
BugzillaClient client = connector.getClientManager().getClient(repository);
return client.postTaskData(taskData);
+ } catch (UnrecognizedReponseException e) {
+ throw new CoreException(new Status(IStatus.OK, BugzillaCorePlugin.PLUGIN_ID, IStatus.INFO, "Posting to "
+ + repository.getUrl() + " failed.", e));
} catch (Throwable e) {
throw new CoreException(new Status(IStatus.OK, BugzillaCorePlugin.PLUGIN_ID, IStatus.ERROR, "Posting to "
+ repository.getUrl() + " failed: " + e.getMessage(), e));
diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/editors/AbstractRepositoryTaskEditor.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/editors/AbstractRepositoryTaskEditor.java
index def996507..5557b2450 100644
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/editors/AbstractRepositoryTaskEditor.java
+++ b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/editors/AbstractRepositoryTaskEditor.java
@@ -2510,7 +2510,7 @@ public abstract class AbstractRepositoryTaskEditor extends TaskFormPage {
PlatformUI.getWorkbench().getDisplay().asyncExec(new Runnable() {
public void run() {
- if (event.getJob().getResult().getCode() != Status.ERROR) {
+ if (event.getJob().getResult().getCode() == Status.OK) {
if (getRepositoryTaskData().isNew()) {
try {
modifiedTask = handleNewBugPost(event.getJob().getResult().getMessage());
@@ -2606,7 +2606,7 @@ public abstract class AbstractRepositoryTaskEditor extends TaskFormPage {
protected void handleSubmitError(final IJobChangeEvent event) {
if (event.getJob().getResult().getCode() == Status.INFO) {
- WebBrowserDialog.openAcceptAgreement(null, "Failed to submit to repository", event.getJob().getResult()
+ WebBrowserDialog.openAcceptAgreement(this.getSite().getShell(), "Failed to submit to repository", event.getJob().getResult()
.getMessage(), event.getJob().getResult().getException().getMessage());
} else if (event.getJob().getResult().getCode() == Status.ERROR) {
MylarStatusHandler.fail(event.getJob().getResult().getException(), "Failed to submit to repository"

Back to the top