Skip to content

Commit

Permalink
Drop workaround for resolved Refaster bug
Browse files Browse the repository at this point in the history
Issue google/error-prone#2456 was fixed in Error Prone 2.22.0.
  • Loading branch information
Stephan202 committed Jan 13, 2024
1 parent b8eabff commit 22e9f18
Showing 1 changed file with 2 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -88,16 +88,8 @@ public Refaster(ErrorProneFlags flags) {
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);

Expand Down

0 comments on commit 22e9f18

Please sign in to comment.