diff options
author | Kevin Sawicki | 2011-09-12 15:09:22 +0000 |
---|---|---|
committer | Kevin Sawicki | 2011-09-12 15:09:22 +0000 |
commit | 30e7ca24d5a42fa93143bdc72d13476c1e86e1ce (patch) | |
tree | a8f8a9eee55cf04898aa144fa172d0c45b7028d1 /org.eclipse.mylyn.github.core/src/org/eclipse/mylyn/internal/github/core | |
parent | f099c430d281c58eadb4257ba29580bff69584d9 (diff) | |
download | egit-github-30e7ca24d5a42fa93143bdc72d13476c1e86e1ce.tar.gz egit-github-30e7ca24d5a42fa93143bdc72d13476c1e86e1ce.tar.xz egit-github-30e7ca24d5a42fa93143bdc72d13476c1e86e1ce.zip |
Guard against null pull request operation value.
Previously the attribute was checked for but not
if the attribute operation value was non-null.
Change-Id: I559e292633bcd50280a096caa5a7da6053a3df68
Signed-off-by: Kevin Sawicki <kevin@github.com>
Diffstat (limited to 'org.eclipse.mylyn.github.core/src/org/eclipse/mylyn/internal/github/core')
-rw-r--r-- | org.eclipse.mylyn.github.core/src/org/eclipse/mylyn/internal/github/core/pr/PullRequestTaskDataHandler.java | 15 |
1 files changed, 4 insertions, 11 deletions
diff --git a/org.eclipse.mylyn.github.core/src/org/eclipse/mylyn/internal/github/core/pr/PullRequestTaskDataHandler.java b/org.eclipse.mylyn.github.core/src/org/eclipse/mylyn/internal/github/core/pr/PullRequestTaskDataHandler.java index c40bce2d..c0816077 100644 --- a/org.eclipse.mylyn.github.core/src/org/eclipse/mylyn/internal/github/core/pr/PullRequestTaskDataHandler.java +++ b/org.eclipse.mylyn.github.core/src/org/eclipse/mylyn/internal/github/core/pr/PullRequestTaskDataHandler.java @@ -214,17 +214,10 @@ public class PullRequestTaskDataHandler extends GitHubTaskDataHandler { if (operationAttribute != null) { PullRequestOperation operation = PullRequestOperation .fromId(operationAttribute.getValue()); - if (operation != PullRequestOperation.LEAVE) - switch (operation) { - case REOPEN: - pr.setState(IssueService.STATE_OPEN); - break; - case CLOSE: - pr.setState(IssueService.STATE_CLOSED); - break; - default: - break; - } + if (operation == PullRequestOperation.REOPEN) + pr.setState(IssueService.STATE_OPEN); + else if (operation == PullRequestOperation.CLOSE) + pr.setState(IssueService.STATE_CLOSED); } prService.editPullRequest(repo, pr); } |