private List < RunResults > generateRunResultList ( List < File > reportInputDataDirs , SrcTree srcTree ) throws IllegalDataStructureException { List < RunResults > resultsList = new ArrayList <> ( reportInputDataDirs . size ( ) ) ; for ( File reportInputDataDir : reportInputDataDirs ) { RunResults results = new RunResults ( ) ; Collection < File > runResultFiles ; File runResultsRootDir = CommonPath . runResultRootDir ( reportInputDataDir ) ; if ( runResultsRootDir . exists ( ) ) { runResultFiles = FileUtils . listFiles ( runResultsRootDir , null , true ) ; } else { runResultFiles = new ArrayList <> ( 0 ) ; } for ( File runResultFile : runResultFiles ) { Map < String , Object > runResultYamlObj = YamlUtils . load ( runResultFile ) ; RootMethodRunResult rootMethodRunResult = new RootMethodRunResult ( ) ; try { rootMethodRunResult . fromYamlObject ( runResultYamlObj ) ; } catch ( YamlConvertException e ) { throw new IllegalDataStructureException ( e ) ; } results . addRootMethodRunResults ( rootMethodRunResult ) ; } results . resolveKeyReference ( srcTree ) ; resultsList . add ( results ) ; } return resultsList ; }
returns RunResults list for reportInputDataDirs