From 22e9f18bf67bad3e082a0a4bfd8c9ae28b8201d1 Mon Sep 17 00:00:00 2001 From: Stephan Schroevers Date: Sat, 13 Jan 2024 19:00:39 +0100 Subject: [PATCH] Drop workaround for resolved Refaster bug Issue google/error-prone#2456 was fixed in Error Prone 2.22.0. --- .../picnic/errorprone/refaster/runner/Refaster.java | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) diff --git a/refaster-runner/src/main/java/tech/picnic/errorprone/refaster/runner/Refaster.java b/refaster-runner/src/main/java/tech/picnic/errorprone/refaster/runner/Refaster.java index f2a5d8c324..a4322d2bb4 100644 --- a/refaster-runner/src/main/java/tech/picnic/errorprone/refaster/runner/Refaster.java +++ b/refaster-runner/src/main/java/tech/picnic/errorprone/refaster/runner/Refaster.java @@ -88,16 +88,8 @@ public Refaster(ErrorProneFlags flags) { public Description matchCompilationUnit(CompilationUnitTree tree, VisitorState state) { /* First, collect all matches. */ List 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);