Hello
I ran into an issue with the processing of collections in a CompositeItemProcessor, what bugs me is that I made a smoke test some time ago where I return a list of items which properly got written by a FlatFileItemWriter.
I need to revisit that smoke test though to be sure.
The issue I ran into is that if I return a list of items by the last processor the write method of the ItemWriter will not decompose the list since the list I returned in my processor is wrapped in another list by the SimpleChunkProcessor by the method:
I cannot foresee the side effects yet but I was wondering if it makes sense to overload the add method with;Code:70 71 public void add(W item) { 72 items.add(item); 73 }
For the time being I will extend FlatFileItemWriter and override the write method and decomposing the outer list if I get nested list structures as the output of my processor chain.Code:public void add(Collection<? extends W> items){ items.addAll(items); }
Any comments appreciated.
Best regards


Reply With Quote