Skip to content
Snippets Groups Projects
Commit 0efa33fa authored by Wai Yi Leung's avatar Wai Yi Leung
Browse files

Reimplement some .par, removing for-loops. Avoiding warnings from the compiler...

Reimplement some .par, removing for-loops. Avoiding warnings from the compiler wining about version specific syntax.
parent 998687b1
No related branches found
No related tags found
No related merge requests found
......@@ -142,9 +142,14 @@ trait ReportBuilder extends ToolCommand {
// Static files that will be copied to the output folder, then file is added to [resourceDir] it's need to be added here also
val extOutputDir: File = new File(cmdArgs.outputDir, "ext")
for (resource <- extFiles.par) {
IoUtils.copyStreamToFile(getClass.getResourceAsStream(resource.resourcePath), new File(extOutputDir, resource.targetPath), createDirs = true)
}
// Copy each resource files out to the report destination
extFiles.par.foreach(
resource =>
IoUtils.copyStreamToFile(
getClass.getResourceAsStream(resource.resourcePath),
new File(extOutputDir, resource.targetPath),
createDirs = true)
)
logger.info("Parsing summary")
setSummary = new Summary(cmdArgs.summary)
......@@ -165,7 +170,7 @@ trait ReportBuilder extends ToolCommand {
/** This must be implemented, this will be the root page of the report */
def indexPage: ReportPage
/** This must be implemented, this will because the title of the report */
/** This must be implemented, this will become the title of the report */
def reportName: String
/**
......@@ -194,8 +199,9 @@ trait ReportBuilder extends ToolCommand {
)
// Generating subpages
val jobs = for ((name, subPage) <- page.subPages.par) yield {
generatePage(summary, subPage, outputDir, path ::: name :: Nil, pageArgs)
val jobs = page.subPages.par.flatMap {
case (name, subPage) => Some(generatePage(summary, subPage, outputDir, path ::: name :: Nil, pageArgs))
case _ => None
}
val output = ReportBuilder.renderTemplate("/nl/lumc/sasc/biopet/core/report/main.ssp",
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment