Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSteffen Pingel2012-05-23 17:18:40 -0400
committerSteffen Pingel2012-05-23 17:18:40 -0400
commit26ec16e2cb714094d58bf0e0ffd9f6771f3af03c (patch)
tree476b7d43745e07f4e28ae749573c750f671fa855
parentd49d674e0b29ee523b58a830a7ab9589fb0c96a9 (diff)
downloadorg.eclipse.mylyn.tasks-26ec16e2cb714094d58bf0e0ffd9f6771f3af03c.tar.gz
org.eclipse.mylyn.tasks-26ec16e2cb714094d58bf0e0ffd9f6771f3af03c.tar.xz
org.eclipse.mylyn.tasks-26ec16e2cb714094d58bf0e0ffd9f6771f3af03c.zip
NEW - bug 375076: [api] move classes in
org.eclipse.mylyn.internal.provisional.tasks.core to API package https://bugs.eclipse.org/bugs/show_bug.cgi?id=375076
-rw-r--r--org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/provisional/tasks/core/TasksUtil.java12
-rw-r--r--org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasks/tests/TasksUtilTest.java47
2 files changed, 12 insertions, 47 deletions
diff --git a/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/provisional/tasks/core/TasksUtil.java b/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/provisional/tasks/core/TasksUtil.java
index b70be4aef..d194abb99 100644
--- a/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/provisional/tasks/core/TasksUtil.java
+++ b/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/provisional/tasks/core/TasksUtil.java
@@ -11,11 +11,19 @@
package org.eclipse.mylyn.internal.provisional.tasks.core;
+import org.eclipse.mylyn.commons.core.CoreUtil;
+
/**
* @author Steffen Pingel
+ * @deprecated
*/
+@Deprecated
public class TasksUtil {
+ /**
+ * @deprecated use {@link CoreUtil#decode(String)} instead
+ */
+ @Deprecated
public static String decode(String text) {
boolean escaped = false;
StringBuffer sb = new StringBuffer(text.length());
@@ -51,6 +59,10 @@ public class TasksUtil {
return sb.toString();
}
+ /**
+ * @deprecated use {@link CoreUtil#encode(String)} instead
+ */
+ @Deprecated
public static String encode(String text) {
StringBuffer sb = new StringBuffer(text.length());
char[] chars = text.toCharArray();
diff --git a/org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasks/tests/TasksUtilTest.java b/org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasks/tests/TasksUtilTest.java
deleted file mode 100644
index e7528f703..000000000
--- a/org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasks/tests/TasksUtilTest.java
+++ /dev/null
@@ -1,47 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2008 Tasktop Technologies and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Tasktop Technologies - initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.mylyn.tasks.tests;
-
-import junit.framework.TestCase;
-
-import org.eclipse.mylyn.internal.provisional.tasks.core.TasksUtil;
-
-public class TasksUtilTest extends TestCase {
-
- public void testDecode() {
- assertEquals("abc", TasksUtil.encode("abc"));
- assertEquals("%2D_", TasksUtil.encode("-"));
- assertEquals("abc%2D_123", TasksUtil.encode("abc-123"));
- assertEquals("", TasksUtil.encode(""));
- }
-
- public void testDecodeInvalid() {
- try {
- String s = TasksUtil.decode("abc-123");
- fail("Expected IllegalArgumentException, got '" + s + "'");
- } catch (IllegalArgumentException e) {
- }
- try {
- String s = TasksUtil.decode("%Z_");
- fail("Expected IllegalArgumentException, got '" + s + "'");
- } catch (IllegalArgumentException e) {
- }
- }
-
- public void testEncode() {
- assertEquals("abc", TasksUtil.decode("abc"));
- assertEquals("-", TasksUtil.decode("%2D_"));
- assertEquals("abc-123", TasksUtil.decode("abc%2D_123"));
- assertEquals("abc-123", TasksUtil.decode(TasksUtil.decode(TasksUtil.encode(TasksUtil.encode("abc-123")))));
- }
-
-}

Back to the top