Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorspingel2010-12-09 10:28:48 -0500
committerspingel2010-12-09 10:28:48 -0500
commit2db6b9812230ec450c00309ff6a1d345e80d2162 (patch)
tree18eb076066add06cf5258fe111c7b10ff3cc27cd
parent6e9f2e1b272f20afd7e72ff0472bceac5d341bf7 (diff)
downloadorg.eclipse.mylyn.tasks-2db6b9812230ec450c00309ff6a1d345e80d2162.tar.gz
org.eclipse.mylyn.tasks-2db6b9812230ec450c00309ff6a1d345e80d2162.tar.xz
org.eclipse.mylyn.tasks-2db6b9812230ec450c00309ff6a1d345e80d2162.zip
NEW - bug 330901: IllegalArgumentException at local Task > Copy Details > ID
https://bugs.eclipse.org/bugs/show_bug.cgi?id=330901
-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 59737850b..f2e087cb3 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;
@@ -63,6 +64,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