diff --git a/core/src/test/java/com/google/errorprone/bugpatterns/threadsafety/GuardedByBinderTest.java b/core/src/test/java/com/google/errorprone/bugpatterns/threadsafety/GuardedByBinderTest.java index 5ad07056f184..73dcb7500617 100644 --- a/core/src/test/java/com/google/errorprone/bugpatterns/threadsafety/GuardedByBinderTest.java +++ b/core/src/test/java/com/google/errorprone/bugpatterns/threadsafety/GuardedByBinderTest.java @@ -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; @@ -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; @@ -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.emptyList(), - null, - Arrays.asList(fileObject)); + /* fileManager= */ FileManagers.testFileManager(), + /* diagnosticListener= */ null, + /* options= */ ImmutableList.of("-proc:none"), + /* classes= */ null, + /* compilationUnits= */ Arrays.asList(fileObject)); Iterable compilationUnits = task.parse(); task.analyze(); for (CompilationUnitTree compilationUnit : compilationUnits) {