Skip to content

Commit 53824bb

Browse files
committed
Minor allow null output params and values [ci fast]
Signed-off-by: Paolo Di Tommaso <[email protected]>
1 parent 504bd2d commit 53824bb

File tree

1 file changed

+10
-7
lines changed

1 file changed

+10
-7
lines changed

modules/nf-lineage/src/main/nextflow/lineage/LinObserver.groovy

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -203,11 +203,11 @@ class LinObserver implements TraceObserver {
203203
return key
204204
}
205205

206-
private List<Parameter> getNormalizedTaskOutputs( TaskRun task, PathNormalizer normalizer){
206+
private List<Parameter> getNormalizedTaskOutputs(TaskRun task, PathNormalizer normalizer){
207207
final outputs = task.getOutputs()
208208
final outputParams = new LinkedList<Parameter>()
209-
outputs.forEach { OutParam key, Object value ->
210-
manageTaskOutputParameter(key, outputParams, value, task, normalizer)
209+
for( Map.Entry<OutParam,Object> entry : outputs ) {
210+
manageTaskOutputParameter(entry.key, outputParams, entry.value, task, normalizer)
211211
}
212212
return outputParams
213213
}
@@ -231,7 +231,8 @@ class LinObserver implements TraceObserver {
231231

232232
private Object manageFileOutParam(Object value, TaskRun task) {
233233
if (value == null) {
234-
throw new IllegalArgumentException("Unexpected output null for task '${task.name}'")
234+
log.debug "Unexpected lineage File output value null"
235+
return null
235236
}
236237
if (value instanceof Path) {
237238
return asUriString(storeTaskOutput(task, (Path) value))
@@ -407,9 +408,11 @@ class LinObserver implements TraceObserver {
407408
return Collection.simpleName
408409
if( param instanceof Map)
409410
return Map.simpleName
410-
return param!=null
411-
? param.class.simpleName
412-
: null
411+
if( param==null ) {
412+
log.debug "Unexpected lineage param type null"
413+
return null
414+
}
415+
return param.class.simpleName
413416
}
414417

415418
private Object convertPathsToLidReferences(Object value){

0 commit comments

Comments
 (0)