Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Disable implicit annotation processing in some tests #4494

Merged
merged 1 commit into from
Jul 23, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
import static java.nio.charset.StandardCharsets.UTF_8;
import static org.junit.Assert.fail;

import com.google.common.collect.ImmutableList;
import com.google.errorprone.FileManagers;
import com.google.errorprone.VisitorState;
import com.google.errorprone.util.ASTHelpers;
Expand All @@ -34,7 +35,6 @@
import java.io.PrintWriter;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collections;
import java.util.List;
import java.util.Optional;
import javax.tools.JavaCompiler;
Expand Down Expand Up @@ -497,13 +497,13 @@ private static String bind(String className, String exprString, JavaFileObject f
JavacTaskImpl task =
(JavacTaskImpl)
javaCompiler.getTask(
new PrintWriter(
/* out= */ new PrintWriter(
new BufferedWriter(new OutputStreamWriter(System.err, UTF_8)), true),
FileManagers.testFileManager(),
null,
Collections.<String>emptyList(),
null,
Arrays.asList(fileObject));
/* fileManager= */ FileManagers.testFileManager(),
/* diagnosticListener= */ null,
/* options= */ ImmutableList.of("-proc:none"),
/* classes= */ null,
/* compilationUnits= */ Arrays.asList(fileObject));
Iterable<? extends CompilationUnitTree> compilationUnits = task.parse();
task.analyze();
for (CompilationUnitTree compilationUnit : compilationUnits) {
Expand Down
Loading