- Enclosing class:
- AbstractMustBeClosedChecker
protected abstract static class AbstractMustBeClosedChecker.Change
extends Object
Error Prone's fix application logic doesn't like it when a fix suggests multiple identical
insertions at the same position. This Change class breaks up a SuggestedFix into two parts: a
position at which to insert a close brace, and a SuggestedFix of other related changes. We use
this to aggregate all the suggested changes within a method, so that we can handle adding
multiple try blocks with the same scope. Instead of emitting N fixes that each add a new
close-brace at the end of that scope, we emit a single fix that adds N close braces.