File tree Expand file tree Collapse file tree 1 file changed +3
-2
lines changed
check_api/src/main/java/com/google/errorprone/bugpatterns Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change 24
24
import com .google .common .collect .ImmutableRangeSet ;
25
25
import com .google .common .collect .Iterables ;
26
26
import com .google .common .collect .Range ;
27
+ import com .google .common .collect .TreeRangeSet ;
27
28
import com .google .errorprone .BugCheckerInfo ;
28
29
import com .google .errorprone .BugPattern .SeverityLevel ;
29
30
import com .google .errorprone .ErrorProneOptions ;
@@ -306,7 +307,7 @@ public boolean isSuppressed(Symbol sym, VisitorState state) {
306
307
307
308
/** Computes a RangeSet of code regions which are suppressed by this bug checker. */
308
309
public ImmutableRangeSet <Integer > suppressedRegions (VisitorState state ) {
309
- ImmutableRangeSet . Builder <Integer > suppressedRegions = ImmutableRangeSet . builder ();
310
+ TreeRangeSet <Integer > suppressedRegions = TreeRangeSet . create ();
310
311
new TreeScanner <Void , Void >() {
311
312
@ Override
312
313
public Void scan (Tree tree , Void unused ) {
@@ -318,7 +319,7 @@ public Void scan(Tree tree, Void unused) {
318
319
return null ;
319
320
}
320
321
}.scan (state .getPath ().getCompilationUnit (), null );
321
- return suppressedRegions . build ( );
322
+ return ImmutableRangeSet . copyOf ( suppressedRegions );
322
323
}
323
324
324
325
public interface AnnotationTreeMatcher extends Suppressible {
You can’t perform that action at this time.
0 commit comments