public static List<TestDiagnosticLine> readExpectedDiagnosticLinesJfo(Iterable<? extends JavaFileObject> toRead,boolean omitEmptyDiagnostics){
  List<TestDiagnosticLine> lines=new ArrayList<>();
  for (  JavaFileObject file : toRead) {
    lines.addAll(readDiagnosticsJfo(file,omitEmptyDiagnostics));
  }
  return lines;
}

public static List < TestDiagnosticLine > readExpectedDiagnosticLinesJfo ( Iterable < ? extends JavaFileObject > toRead , boolean omitEmptyDiagnostics ) { List < TestDiagnosticLine > lines = new ArrayList < > ( ) ; for ( JavaFileObject file : toRead ) { lines . addAll ( readDiagnosticsJfo ( file , omitEmptyDiagnostics ) ) ; } return lines ; }
reads diagnostic lines from the comments of a set of java file .
