mirror of
https://github.com/jlengrand/error-prone-support.git
synced 2026-03-10 08:11:25 +00:00
Drop workaround for resolved Refaster bug (#974)
Issue google/error-prone#2456 was fixed in Error Prone 2.22.0.
This commit is contained in:
committed by
GitHub
parent
b8eabff9bc
commit
d126336742
@@ -88,16 +88,8 @@ public final class Refaster extends BugChecker implements CompilationUnitTreeMat
|
||||
public Description matchCompilationUnit(CompilationUnitTree tree, VisitorState state) {
|
||||
/* First, collect all matches. */
|
||||
List<Description> matches = new ArrayList<>();
|
||||
try {
|
||||
codeTransformer.apply(state.getPath(), new SubContext(state.context), matches::add);
|
||||
} catch (LinkageError e) {
|
||||
// XXX: This `try/catch` block handles the issue described and resolved in
|
||||
// https://github.com/google/error-prone/pull/2456. Drop this block once that change is
|
||||
// released.
|
||||
// XXX: Find a way to identify that we're running Picnic's Error Prone fork and disable this
|
||||
// fallback if so, as it might hide other bugs.
|
||||
return Description.NO_MATCH;
|
||||
}
|
||||
codeTransformer.apply(state.getPath(), new SubContext(state.context), matches::add);
|
||||
|
||||
/* Then apply them. */
|
||||
applyMatches(matches, ((JCCompilationUnit) tree).endPositions, state);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user