Fix some issues from last commit

This commit is contained in:
dsyer
2010-01-14 13:05:43 +00:00
parent 5c8f527443
commit 56dafae8f1
6 changed files with 9 additions and 4 deletions

View File

@@ -207,7 +207,7 @@ public abstract class AbstractMethodInvokingDelegator<T> implements Initializing
* is assumed correct values will be supplied at runtime.
*/
public void setArguments(Object[] arguments) {
this.arguments = Arrays.asList(arguments).toArray();
this.arguments = arguments == null ? null : Arrays.asList(arguments).toArray();
}
/**

View File

@@ -204,6 +204,7 @@ public class MultiResourceItemReader<T> implements ItemReader<T>, ItemStream {
* @param resources input resources
*/
public void setResources(Resource[] resources) {
Assert.notNull(resources, "The resources must not be null");
this.resources = Arrays.asList(resources).toArray(new Resource[resources.length]);
}

View File

@@ -79,7 +79,7 @@ public abstract class AbstractLineTokenizer implements LineTokenizer {
* @param names
*/
public void setNames(String[] names) {
this.names = Arrays.asList(names).toArray(new String[names.length]);
this.names = names==null ? null : Arrays.asList(names).toArray(new String[names.length]);
}
/**

View File

@@ -41,6 +41,7 @@ public class BeanWrapperFieldExtractor<T> implements FieldExtractor<T>, Initiali
* @param names field names to be extracted by the {@link #extract(Object)} method.
*/
public void setNames(String[] names) {
Assert.notNull(names, "Names must be non-null");
this.names = Arrays.asList(names).toArray(new String[names.length]);
}