6838dabc15
A few statements around the package read: > Producers used in bulk fixes must not modify the FixKind during > computation. In fact, this `add_null_check` correction producer seems to be the _only_ remaining producer that violates this statement. In order to fix it, such that `fixKind` is set during constructor initialization, we must do some poking around the AST. So we convert `_computeTarget` to be static (and change it to also compute and return any possible null-aware token, renaming it to `_computeTargetAndNullAwareToken`). We also convert `_isNullAware` to be static. Then the two public constructors are converted into factory constructors that determine the fix kind, and store the `_target` and `_nullAwareToken` in fields, so as to avoid re-computing them during `compute()`. Change-Id: Ic66319ef764dd9bd69f0e1059347acf174debb25 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/419420 Reviewed-by: Brian Wilkerson <brianwilkerson@google.com> Commit-Queue: Samuel Rawlins <srawlins@google.com>