Skip to content

Commit 885b213

Browse files
cushonError Prone Team
authored andcommitted
Update format strings to use placeholders
More information:[] PiperOrigin-RevId: 833432381
1 parent 450126a commit 885b213

File tree

1 file changed

+4
-7
lines changed

1 file changed

+4
-7
lines changed

test_helpers/src/main/java/com/google/errorprone/CompilationTestHelper.java

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -335,16 +335,13 @@ public void doTest() {
335335
if (expectNoDiagnostics) {
336336
List<Diagnostic<? extends JavaFileObject>> diagnostics = diagnosticHelper.getDiagnostics();
337337
assertWithMessage(
338-
String.format(
339-
"Expected no diagnostics produced, but found %d: %s",
340-
diagnostics.size(), diagnostics))
338+
"Expected no diagnostics produced, but found %s: %s", diagnostics.size(), diagnostics)
341339
.that(diagnostics.size())
342340
.isEqualTo(0);
343341
assertWithMessage(
344-
String.format(
345-
"Expected compilation result to be %s, but was %s. No diagnostics were emitted."
346-
+ " OutputStream from Compiler follows.\n\n%s",
347-
expectedResult.orElse(Result.OK), result, outputStream))
342+
"Expected compilation result to be %s, but was %s. No diagnostics were emitted."
343+
+ " OutputStream from Compiler follows.\n\n%s",
344+
expectedResult.orElse(Result.OK), result, outputStream)
348345
.that(result)
349346
.isEqualTo(expectedResult.orElse(Result.OK));
350347
} else {

0 commit comments

Comments
 (0)