[hg] main-silver: #236845 - org.eclipse.core.runtime.OperationCa...

  • From: Ondrej Vrabec < >
  • To:
  • Subject: [hg] main-silver: #236845 - org.eclipse.core.runtime.OperationCa...
  • Date: Mon, 07 Oct 2013 15:09:26 -0700

changeset a6c88e0cdbe2 in main-silver ((none))
details: http://hg.netbeans.org/main-silver/rev/a6c88e0cdbe2
description:
        #236845 - org.eclipse.core.runtime.OperationCanceledException at 
org.eclipse.mylyn.internal.tasks.core.TaskList.lock

diffstat:

 
bugzilla/src/org/netbeans/modules/bugzilla/repository/BugzillaRepository.java 
|  7 +++++++
 jira/src/org/netbeans/modules/jira/repository/JiraRepository.java            
 |  7 +++++++
 localtasks/src/org/netbeans/modules/localtasks/LocalRepository.java          
 |  7 +++++++
 
odcs.tasks/src/org/netbeans/modules/odcs/tasks/repository/ODCSRepository.java 
|  8 +++++++-
 4 files changed, 28 insertions(+), 1 deletions(-)

diffs (104 lines):

diff --git 
a/bugzilla/src/org/netbeans/modules/bugzilla/repository/BugzillaRepository.java
 
b/bugzilla/src/org/netbeans/modules/bugzilla/repository/BugzillaRepository.java
--- 
a/bugzilla/src/org/netbeans/modules/bugzilla/repository/BugzillaRepository.java
+++ 
b/bugzilla/src/org/netbeans/modules/bugzilla/repository/BugzillaRepository.java
@@ -64,6 +64,7 @@
 import java.util.logging.Level;
 import javax.swing.SwingUtilities;
 import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.OperationCanceledException;
 import org.eclipse.mylyn.commons.net.AuthenticationCredentials;
 import org.eclipse.mylyn.commons.net.AuthenticationType;
 import org.eclipse.mylyn.internal.bugzilla.core.IBugzillaConstants;
@@ -205,6 +206,12 @@
         try {
             task = MylynSupport.getInstance().createTask(taskRepository, new 
TaskMapping(product, component));
             return getIssueForTask(task);
+        } catch (OperationCanceledException ex) {
+            // creation of new task may be immediately canceled
+            // happens when more repositories are available and
+            // the RepoComboSupport immediately switches to another repo
+            Bugzilla.LOG.log(Level.FINE, null, ex);
+            return null;
         } catch (CoreException ex) {
             Bugzilla.LOG.log(Level.WARNING, null, ex);
             return null;
diff --git 
a/jira/src/org/netbeans/modules/jira/repository/JiraRepository.java 
b/jira/src/org/netbeans/modules/jira/repository/JiraRepository.java
--- a/jira/src/org/netbeans/modules/jira/repository/JiraRepository.java
+++ b/jira/src/org/netbeans/modules/jira/repository/JiraRepository.java
@@ -71,6 +71,7 @@
 import javax.swing.SwingUtilities;
 import org.eclipse.core.runtime.CoreException;
 import org.eclipse.core.runtime.NullProgressMonitor;
+import org.eclipse.core.runtime.OperationCanceledException;
 import org.eclipse.mylyn.commons.net.AuthenticationCredentials;
 import org.eclipse.mylyn.commons.net.AuthenticationType;
 import org.eclipse.mylyn.tasks.core.IRepositoryQuery;
@@ -213,6 +214,12 @@
                 }
             });
             return getIssueForTask(task);
+        } catch (OperationCanceledException ex) {
+            // creation of new task may be immediately canceled
+            // happens when more repositories are available and
+            // the RepoComboSupport immediately switches to another repo
+            Jira.LOG.log(Level.FINE, null, ex);
+            return null;
         } catch (CoreException ex) {
             Jira.LOG.log(Level.WARNING, null, ex);
             return null;
diff --git 
a/localtasks/src/org/netbeans/modules/localtasks/LocalRepository.java 
b/localtasks/src/org/netbeans/modules/localtasks/LocalRepository.java
--- a/localtasks/src/org/netbeans/modules/localtasks/LocalRepository.java
+++ b/localtasks/src/org/netbeans/modules/localtasks/LocalRepository.java
@@ -58,6 +58,7 @@
 import java.util.logging.Level;
 import java.util.logging.Logger;
 import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.OperationCanceledException;
 import org.eclipse.mylyn.tasks.core.TaskMapping;
 import org.eclipse.mylyn.tasks.core.TaskRepository;
 import org.netbeans.modules.bugtracking.api.Repository;
@@ -204,6 +205,12 @@
             });
             LocalQuery.getInstance().fireTasksChanged();
             return getLocalTask(task);
+        } catch (OperationCanceledException ex) {
+            // creation of new task may be immediately canceled
+            // happens when more repositories are available and
+            // the RepoComboSupport immediately switches to another repo
+            LOG.log(Level.FINE, null, ex);
+            return null;
         } catch (CoreException ex) {
             LOG.log(Level.WARNING, null, ex);
             return null;
diff --git 
a/odcs.tasks/src/org/netbeans/modules/odcs/tasks/repository/ODCSRepository.java
 
b/odcs.tasks/src/org/netbeans/modules/odcs/tasks/repository/ODCSRepository.java
--- 
a/odcs.tasks/src/org/netbeans/modules/odcs/tasks/repository/ODCSRepository.java
+++ 
b/odcs.tasks/src/org/netbeans/modules/odcs/tasks/repository/ODCSRepository.java
@@ -44,7 +44,6 @@
 import com.tasktop.c2c.server.common.service.domain.criteria.ColumnCriteria;
 import com.tasktop.c2c.server.common.service.domain.criteria.Criteria;
 import com.tasktop.c2c.server.tasks.domain.PredefinedTaskQuery;
-import com.tasktop.c2c.server.tasks.domain.Priority;
 import com.tasktop.c2c.server.tasks.domain.RepositoryConfiguration;
 import com.tasktop.c2c.server.tasks.domain.SavedTaskQuery;
 import java.awt.Image;
@@ -70,6 +69,7 @@
 import oracle.eclipse.tools.cloud.dev.tasks.CloudDevConstants;
 import org.eclipse.core.runtime.CoreException;
 import org.eclipse.core.runtime.NullProgressMonitor;
+import org.eclipse.core.runtime.OperationCanceledException;
 import org.eclipse.mylyn.commons.net.AuthenticationCredentials;
 import org.eclipse.mylyn.commons.net.AuthenticationType;
 import org.eclipse.mylyn.tasks.core.IRepositoryQuery;
@@ -495,6 +495,12 @@
         try {
             task = MylynSupport.getInstance().createTask(taskRepository, new 
TaskMapping());
             return getIssueForTask(task);
+        } catch (OperationCanceledException ex) {
+            // creation of new task may be immediately canceled
+            // happens when more repositories are available and
+            // the RepoComboSupport immediately switches to another repo
+            ODCS.LOG.log(Level.FINE, null, ex);
+            return null;
         } catch (CoreException ex) {
             ODCS.LOG.log(Level.WARNING, null, ex);
             return null;

[hg] main-silver: #236845 - org.eclipse.core.runtime.OperationCa...

Ondrej Vrabec 10/07/2013

Project Features

About this Project

ConnectedDeveloper was started in November 2009, is owned by tpavek, and has 66 members.
By use of this website, you agree to the NetBeans Policies and Terms of Use (revision 20140418.2d69abc). © 2013, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo
 
 
Close
loading
Please Confirm
Close