OPEN - issue BATCH-865: CompositeItemProcessor should handle null properly
http://jira.springframework.org/browse/BATCH-865 If any processor returns null, then the composite will now return null.
This commit is contained in:
@@ -25,6 +25,9 @@ public class CompositeItemProcessor<I, O> implements ItemProcessor<I, O>, Initia
|
||||
Object result = item;
|
||||
|
||||
for(ItemProcessor transformer: itemProcessors){
|
||||
if(result == null){
|
||||
return null;
|
||||
}
|
||||
result = transformer.process(result);
|
||||
}
|
||||
return (O) result;
|
||||
|
||||
Reference in New Issue
Block a user