Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKevin Sawicki2011-10-25 18:51:13 +0000
committerKevin Sawicki2011-10-25 18:51:13 +0000
commit521e2f4f9545e3481a76b9aa8a89cf037b1d2dfb (patch)
tree6841338c5fab211c3ed5eaffb64199aa4c78d247 /org.eclipse.mylyn.github.core
parentfcc7da77ee1447e3f1f7d7111f5923e825e3a162 (diff)
downloadegit-github-521e2f4f9545e3481a76b9aa8a89cf037b1d2dfb.tar.gz
egit-github-521e2f4f9545e3481a76b9aa8a89cf037b1d2dfb.tar.xz
egit-github-521e2f4f9545e3481a76b9aa8a89cf037b1d2dfb.zip
Add guards for null and empty task urls
Bug: 361661 Change-Id: Ie571b11892dc0c7408178894d4253bc7bba1ece4 Signed-off-by: Kevin Sawicki <kevin@github.com>
Diffstat (limited to 'org.eclipse.mylyn.github.core')
-rw-r--r--org.eclipse.mylyn.github.core/src/org/eclipse/mylyn/internal/github/core/RepositoryConnector.java4
1 files changed, 3 insertions, 1 deletions
diff --git a/org.eclipse.mylyn.github.core/src/org/eclipse/mylyn/internal/github/core/RepositoryConnector.java b/org.eclipse.mylyn.github.core/src/org/eclipse/mylyn/internal/github/core/RepositoryConnector.java
index c0614a6c..c8857613 100644
--- a/org.eclipse.mylyn.github.core/src/org/eclipse/mylyn/internal/github/core/RepositoryConnector.java
+++ b/org.eclipse.mylyn.github.core/src/org/eclipse/mylyn/internal/github/core/RepositoryConnector.java
@@ -45,7 +45,9 @@ public abstract class RepositoryConnector extends AbstractRepositoryConnector {
}
@Override
- public String getTaskIdFromTaskUrl(String taskFullUrl) {
+ public String getTaskIdFromTaskUrl(final String taskFullUrl) {
+ if (taskFullUrl == null || taskFullUrl.length() == 0)
+ return null;
int lastSlash = taskFullUrl.lastIndexOf('/');
if (lastSlash != -1 && lastSlash + 1 < taskFullUrl.length())
return taskFullUrl.substring(lastSlash + 1);

Back to the top