Fix some issues from last commit
This commit is contained in:
@@ -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();
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -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]);
|
||||
}
|
||||
|
||||
|
||||
@@ -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]);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -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]);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user