Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorspingel2010-12-09 10:29:13 -0500
committerspingel2010-12-09 10:29:13 -0500
commit0e62b3c46018c311d052621948886309d7c6fecb (patch)
tree07c83b5e0711c267aa01f2999654e600492dd3ee /org.eclipse.mylyn.tasks.ui
parent533e8bb2b9bdd95b4a3c48f36491dc5802dbb888 (diff)
downloadorg.eclipse.mylyn.tasks-0e62b3c46018c311d052621948886309d7c6fecb.tar.gz
org.eclipse.mylyn.tasks-0e62b3c46018c311d052621948886309d7c6fecb.tar.xz
org.eclipse.mylyn.tasks-0e62b3c46018c311d052621948886309d7c6fecb.zip
NEW - bug 330901: IllegalArgumentException at local Task > Copy Details > ID
https://bugs.eclipse.org/bugs/show_bug.cgi?id=330901
Diffstat (limited to 'org.eclipse.mylyn.tasks.ui')
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/util/ClipboardCopier.java8
1 files changed, 8 insertions, 0 deletions
diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/util/ClipboardCopier.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/util/ClipboardCopier.java
index e9874f9d7..dc28c46a1 100644
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/util/ClipboardCopier.java
+++ b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/util/ClipboardCopier.java
@@ -13,6 +13,7 @@ package org.eclipse.mylyn.internal.tasks.ui.util;
import java.util.Iterator;
+import org.eclipse.core.runtime.Assert;
import org.eclipse.jface.viewers.IStructuredSelection;
import org.eclipse.swt.dnd.Clipboard;
import org.eclipse.swt.dnd.TextTransfer;
@@ -65,6 +66,13 @@ public class ClipboardCopier {
}
public void copy(String text) {
+ Assert.isNotNull(text);
+
+ // Gtk does support copying empty strings to the clipboard
+ if (text.length() == 0) {
+ return;
+ }
+
if (clipboard == null) {
Display display = PlatformUI.getWorkbench().getDisplay();
clipboard = new Clipboard(display);

Back to the top