RESOLVED - issue BATCH-1448: BeanWrapperFieldSetMapper should throw BindException (so the errors can be accessed)

This commit is contained in:
dsyer
2009-11-24 08:01:16 +00:00
parent 8b512827dc
commit d5b86f45b1
7 changed files with 149 additions and 185 deletions

View File

@@ -19,6 +19,7 @@ import org.springframework.batch.item.file.mapping.FieldSetMapper;
import org.springframework.batch.item.file.transform.FieldSet;
import org.springframework.beans.factory.InitializingBean;
import org.springframework.util.Assert;
import org.springframework.validation.BindException;
/**
* Delegating mapper to convert form a vanilla {@link FieldSetMapper} to one
@@ -82,8 +83,9 @@ public class AggregateItemFieldSetMapper<T> implements FieldSetMapper<AggregateI
*
* @return an {@link AggregateItem} that wraps the return value from the
* delegate
* @throws BindException if one of the delegates does
*/
public AggregateItem<T> mapFieldSet(FieldSet fieldSet) {
public AggregateItem<T> mapFieldSet(FieldSet fieldSet) throws BindException {
if (fieldSet.readString(0).equals(begin)) {
return AggregateItem.getHeader();