diff options
| author | Kevin Sawicki | 2011-04-13 02:47:54 +0000 |
|---|---|---|
| committer | Chris Aniszczyk | 2011-04-14 01:40:12 +0000 |
| commit | dce926a6764b7c3996c3c348e6d31ea0911a34ad (patch) | |
| tree | 6139a86062b3b1e1c2aaddcc15170220a000f6d2 | |
| parent | 99013bc4271ff4643a1b8a0046929c02c4cf7bdd (diff) | |
| download | egit-github-dce926a6764b7c3996c3c348e6d31ea0911a34ad.tar.gz egit-github-dce926a6764b7c3996c3c348e6d31ea0911a34ad.tar.xz egit-github-dce926a6764b7c3996c3c348e6d31ea0911a34ad.zip | |
Parse milestone number only if attribute value is non-empty
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.java | 5 |
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 36552fb3..d334fde2 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; |
