diff --git a/modules/nextflow/src/main/groovy/nextflow/processor/PublishDir.groovy b/modules/nextflow/src/main/groovy/nextflow/processor/PublishDir.groovy index 5756f4e8f9..c7aa29a518 100644 --- a/modules/nextflow/src/main/groovy/nextflow/processor/PublishDir.groovy +++ b/modules/nextflow/src/main/groovy/nextflow/processor/PublishDir.groovy @@ -418,8 +418,8 @@ class PublishDir { final file = workDir.resolve('.fusion.symlinks') return file.text.tokenize('\n') } - catch( NoSuchFileException ) { - return [] + catch( NoSuchFileException e ) { + return List.of() } } diff --git a/modules/nextflow/src/main/groovy/nextflow/processor/TaskRun.groovy b/modules/nextflow/src/main/groovy/nextflow/processor/TaskRun.groovy index 205951016e..23672e4a42 100644 --- a/modules/nextflow/src/main/groovy/nextflow/processor/TaskRun.groovy +++ b/modules/nextflow/src/main/groovy/nextflow/processor/TaskRun.groovy @@ -433,8 +433,8 @@ class TaskRun implements Cloneable { */ Map getInputFilesMap() { - def result = [:] - def allFiles = getInputFiles().values() + final allFiles = getInputFiles().values() + final result = new HashMap(allFiles.size()) for( List entry : allFiles ) { if( entry ) for( FileHolder it : entry ) { result[ it.stageName ] = it.storePath