File tree Expand file tree Collapse file tree 1 file changed +5
-15
lines changed
java-compiler-testing/src/main/java/io/github/ascopes/jct/assertions Expand file tree Collapse file tree 1 file changed +5
-15
lines changed Original file line number Diff line number Diff line change @@ -355,21 +355,11 @@ private void failWithDiagnostics(
355355 .filter (diagnostic -> kindsToDisplay .contains (diagnostic .getKind ()))
356356 .collect (toUnmodifiableList ());
357357
358- if (diagnostics .isEmpty ()) {
359- failWithMessage (message , args );
360- } else {
361- var fullMessage = String .join (
362- "\n " ,
363- args .length > 0
364- ? String .format (message , args )
365- : message ,
366- "" ,
367- "Diagnostics:" ,
368- TraceDiagnosticListRepresentation .getInstance ().toStringOf (diagnostics )
369- );
370-
371- failWithMessage (fullMessage );
372- }
358+ failWithMessage (
359+ "%s\n \n Diagnostics:\n %s" ,
360+ message ,
361+ TraceDiagnosticListRepresentation .getInstance ().toStringOf (diagnostics )
362+ );
373363 }
374364
375365 private void assertLocationExists (Location location , ContainerGroup group ) {
You can’t perform that action at this time.
0 commit comments