PrologRuleEvaluator: Remove unneeded check for closed changes

PrologRuleEvaluator#evaluate() is only used from
PrologRule#evaluate(ChangeData, SubmitRuleOptions) which implements the
SubmitRule interface. SubmitRules are only invoked from
SubmitRuleEvaluator. SubmitRuleEvaluator checks the change state and
whether closed changes are allowed before invoking the submit rules. If
closed changes are not allowed and the change is closed
SubmitRuleEvaluator returns a submit record with status
SubmitRecord.Status.CLOSED and the submit rules are not invoked. This
means PrologRuleEvaluator#evaluate() doesn't need to the same check
again as it is never invoked if this is the case. If this check would be
needed all other implementations of SubmitRule would need to do the
same, but none of them does.

This is part of an effort to eliminate the passing of SubmitRuleOptions
into the submit rules. The SubmitRuleOptions contain mostly
Prolog-specific settings and are only used by the PrologRule. All other
implementation of SubmitRule ignore the options, hence it would be
cleaner to remove them from the SubmitRule interface.

Signed-off-by: Edwin Kempin <ekempin@google.com>
Change-Id: I453b575b6aaf22b335cd3d7fa89df662208abf3b
diff --git a/java/com/google/gerrit/server/rules/PrologRuleEvaluator.java b/java/com/google/gerrit/server/rules/PrologRuleEvaluator.java
index c036c86..4fbde63 100644
--- a/java/com/google/gerrit/server/rules/PrologRuleEvaluator.java
+++ b/java/com/google/gerrit/server/rules/PrologRuleEvaluator.java
@@ -159,12 +159,6 @@
       return ruleError("Error looking up change " + cd.getId(), e);
     }
 
-    if (!opts.allowClosed() && change.isClosed()) {
-      SubmitRecord rec = new SubmitRecord();
-      rec.status = SubmitRecord.Status.CLOSED;
-      return Collections.singletonList(rec);
-    }
-
     List<Term> results;
     try {
       results =