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