Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTomasz Zarna2013-11-21 11:50:47 +0000
committerSteffen Pingel2014-01-24 17:49:50 +0000
commitd95579f554f6004797520fcf127d310eb7a0f7f4 (patch)
tree9103464700dd57284501fa2e6acaccce6956081f
parente242867405e35b1b19f35b1b073f27f02d0b5078 (diff)
downloadorg.eclipse.mylyn.reviews-e_4_4_m_3_10_x.tar.gz
org.eclipse.mylyn.reviews-e_4_4_m_3_10_x.tar.xz
org.eclipse.mylyn.reviews-e_4_4_m_3_10_x.zip
421114: RuntimeException when refreshing Eclipse reviewe_4_4_m_3_10_x
Bug: 421114 Change-Id: I15753de69ad75aa74e7af04d155acb9ff6d1db6e Task-Url: https://bugs.eclipse.org/bugs/show_bug.cgi?id=421114 Signed-off-by: Tomasz Zarna <tomasz.zarna@tasktop.com>
-rw-r--r--org.eclipse.mylyn.gerrit.core/src/org/eclipse/mylyn/internal/gerrit/core/remote/GerritReviewRemoteFactory.java8
1 files changed, 4 insertions, 4 deletions
diff --git a/org.eclipse.mylyn.gerrit.core/src/org/eclipse/mylyn/internal/gerrit/core/remote/GerritReviewRemoteFactory.java b/org.eclipse.mylyn.gerrit.core/src/org/eclipse/mylyn/internal/gerrit/core/remote/GerritReviewRemoteFactory.java
index e591f9c0..1ac8d265 100644
--- a/org.eclipse.mylyn.gerrit.core/src/org/eclipse/mylyn/internal/gerrit/core/remote/GerritReviewRemoteFactory.java
+++ b/org.eclipse.mylyn.gerrit.core/src/org/eclipse/mylyn/internal/gerrit/core/remote/GerritReviewRemoteFactory.java
@@ -55,7 +55,6 @@ import com.google.gerrit.common.data.ChangeInfo;
import com.google.gerrit.common.data.PatchSetDetail;
import com.google.gerrit.reviewdb.Account;
import com.google.gerrit.reviewdb.Change;
-import com.google.gerrit.reviewdb.Change.Status;
import com.google.gerrit.reviewdb.ChangeMessage;
import com.google.gerrit.reviewdb.PatchSetApproval;
import com.google.gerrit.reviewdb.UserIdentity;
@@ -367,8 +366,9 @@ public class GerritReviewRemoteFactory extends ReviewRemoteFactory<GerritChange,
for (Label label : record.getLabels()) {
IApprovalType approvalType = typeForName.get(label.getLabel());
if (approvalType == null) {
- if (detail.getChange().getStatus() == Status.ABANDONED) {
- // typeForName can be empty for an abandoned change as it no longer provides approval types info
+ if (detail.getChange().getStatus().isClosed()) {
+ // typeForName can be empty for a closed* change as it no longer provides approval types info
+ // * abandoned or reverted
continue;
}
throw new RuntimeException("Internal Error, no approval type found for: " + label.getLabel()); //$NON-NLS-1$
@@ -398,7 +398,7 @@ public class GerritReviewRemoteFactory extends ReviewRemoteFactory<GerritChange,
public static ReviewStatus getReviewStatus(com.google.gerrit.reviewdb.Change.Status gerritStatus) {
if (gerritStatus == null) {
- // DRAFT is not correctly parsed for ChangeInfo since Change.Status does not define the corresponding enum field
+ // DRAFT is not correctly parsed for ChangeInfo since Change.Status does not define the corresponding enum field
return ReviewStatus.DRAFT;
}
switch (gerritStatus) {

Back to the top