CombinedCheckState: remove the "passing" boolean
Given those ancestor commits, this boolean field
isn't useful any more.
Change-Id: I78af77a4c0f99c0743f04f51c7cdaa25b622576e
diff --git a/java/com/google/gerrit/plugins/checks/api/BlockingCondition.java b/java/com/google/gerrit/plugins/checks/api/BlockingCondition.java
index f0d032d..6ba3769 100644
--- a/java/com/google/gerrit/plugins/checks/api/BlockingCondition.java
+++ b/java/com/google/gerrit/plugins/checks/api/BlockingCondition.java
@@ -21,10 +21,7 @@
* blocks submission of a change.
*/
public enum BlockingCondition {
- /**
- * Block submission unless the combined state for all checks on the change {@link
- * CombinedCheckState#isPassing() is passing}.
- */
+ /** Block submission unless all required checks on the change is passing. */
STATE_NOT_PASSING;
public static Boolean isRequired(Set<BlockingCondition> blocking) {
diff --git a/java/com/google/gerrit/plugins/checks/api/CombinedCheckState.java b/java/com/google/gerrit/plugins/checks/api/CombinedCheckState.java
index 0975441..b50a41a 100644
--- a/java/com/google/gerrit/plugins/checks/api/CombinedCheckState.java
+++ b/java/com/google/gerrit/plugins/checks/api/CombinedCheckState.java
@@ -29,28 +29,26 @@
*/
public enum CombinedCheckState {
/** At least one required check failed; other checks may have passed, or still be running. */
- FAILED(false),
+ FAILED,
/**
* All relevant checks terminated, and at least one optional check failed, but no required checks
* failed.
- *
- * <p>This state is considered {@link #isPassing() passing}, as in "checks passed with warnings."
*/
- WARNING(true),
+ WARNING,
/**
* At least one relevant check is in a non-terminated state ({@link CheckState#NOT_STARTED},
* {@link CheckState#SCHEDULED}, {@link CheckState#RUNNING}), and no required checks failed. Some
* optional checks may have failed.
*/
- IN_PROGRESS(false),
+ IN_PROGRESS,
/** All relevant checks terminated successfully. */
- SUCCESSFUL(true),
+ SUCCESSFUL,
/** No checks are relevant to this change. */
- NOT_RELEVANT(true);
+ NOT_RELEVANT;
/**
* Combines multiple per-check states into a single combined state.
@@ -97,24 +95,6 @@
return NOT_RELEVANT;
}
- private final boolean passing;
-
- CombinedCheckState(boolean passing) {
- this.passing = passing;
- }
-
- /**
- * Returns whether the state represents a passing state.
- *
- * <p>A passing state is one that is either completed successfully with or without warnings
- * ({@link #WARNING} or {@link #SUCCESSFUL}), or is simply {@link #NOT_RELEVANT}.
- *
- * @return whether the state represents a passing state.
- */
- public boolean isPassing() {
- return passing;
- }
-
@AutoValue
public abstract static class CheckStateCount {
/**