summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKevin Sawicki2011-04-12 22:47:54 (EDT)
committer Chris Aniszczyk2011-04-13 21:40:12 (EDT)
commitdce926a6764b7c3996c3c348e6d31ea0911a34ad (patch)
tree6139a86062b3b1e1c2aaddcc15170220a000f6d2
parent99013bc4271ff4643a1b8a0046929c02c4cf7bdd (diff)
downloadegit-github-dce926a6764b7c3996c3c348e6d31ea0911a34ad.zip
egit-github-dce926a6764b7c3996c3c348e6d31ea0911a34ad.tar.gz
egit-github-dce926a6764b7c3996c3c348e6d31ea0911a34ad.tar.bz2
Parse milestone number only if attribute value is non-emptyrefs/changes/89/3089/2
Change-Id: I7aa1f3e6daba2a11a8097f8a0e400dd439b1e519 Signed-off-by: Kevin Sawicki <kevin@github.com> Signed-off-by: Chris Aniszczyk <caniszczyk@gmail.com>
-rw-r--r--org.eclipse.mylyn.github.core/src/org/eclipse/mylyn/github/internal/GitHubTaskDataHandler.java5
1 files changed, 3 insertions, 2 deletions
diff --git a/org.eclipse.mylyn.github.core/src/org/eclipse/mylyn/github/internal/GitHubTaskDataHandler.java b/org.eclipse.mylyn.github.core/src/org/eclipse/mylyn/github/internal/GitHubTaskDataHandler.java
index 36552fb..d334fde 100644
--- a/org.eclipse.mylyn.github.core/src/org/eclipse/mylyn/github/internal/GitHubTaskDataHandler.java
+++ b/org.eclipse.mylyn.github.core/src/org/eclipse/mylyn/github/internal/GitHubTaskDataHandler.java
@@ -236,8 +236,9 @@ public class GitHubTaskDataHandler extends AbstractTaskDataHandler {
String milestoneValue = getAttributeValue(taskData,
GitHubTaskAttributes.MILESTONE);
if (milestoneValue != null) {
- Milestone milestone = new Milestone().setNumber(Integer
- .parseInt(milestoneValue));
+ Milestone milestone = new Milestone();
+ if (milestoneValue.length() > 0)
+ milestone.setNumber(Integer.parseInt(milestoneValue));
issue.setMilestone(milestone);
}
return issue;