Skip to content

Commit 2a578ae

Browse files
committed
Remove unused imports
1 parent a574813 commit 2a578ae

File tree

6 files changed

+665
-668
lines changed

6 files changed

+665
-668
lines changed

spring-batch-core/src/main/java/org/springframework/batch/core/jsr/step/builder/JsrSimpleStepBuilder.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2013 the original author or authors.
2+
* Copyright 2013-2019 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -19,7 +19,6 @@
1919

2020
import org.springframework.batch.core.ChunkListener;
2121
import org.springframework.batch.core.Step;
22-
import org.springframework.batch.core.StepListener;
2322
import org.springframework.batch.core.jsr.configuration.support.BatchPropertyContext;
2423
import org.springframework.batch.core.jsr.step.BatchletStep;
2524
import org.springframework.batch.core.jsr.step.item.JsrChunkProcessor;
@@ -45,6 +44,7 @@
4544
* pattern defined by the spec.
4645
*
4746
* @author Michael Minella
47+
* @author Mahmoud Ben Hassine
4848
*
4949
* @param <I> The input type for the step
5050
* @param <O> The output type for the step
Lines changed: 73 additions & 74 deletions
Original file line numberDiff line numberDiff line change
@@ -1,74 +1,73 @@
1-
/*
2-
* Copyright 2006-2007 the original author or authors.
3-
*
4-
* Licensed under the Apache License, Version 2.0 (the "License");
5-
* you may not use this file except in compliance with the License.
6-
* You may obtain a copy of the License at
7-
*
8-
* http://www.apache.org/licenses/LICENSE-2.0
9-
*
10-
* Unless required by applicable law or agreed to in writing, software
11-
* distributed under the License is distributed on an "AS IS" BASIS,
12-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13-
* See the License for the specific language governing permissions and
14-
* limitations under the License.
15-
*/
16-
17-
package org.springframework.batch.item.support;
18-
19-
import java.util.Iterator;
20-
21-
import org.springframework.batch.item.ItemReader;
22-
import org.springframework.batch.item.ParseException;
23-
import org.springframework.batch.item.UnexpectedInputException;
24-
import org.springframework.util.Assert;
25-
26-
/**
27-
* An {@link ItemReader} that pulls data from a {@link Iterator} or
28-
* {@link Iterable} using the constructors.
29-
*
30-
* @author Juliusz Brzostek
31-
* @author Dave Syer
32-
*/
33-
public class IteratorItemReader<T> implements ItemReader<T> {
34-
35-
/**
36-
* Internal iterator
37-
*/
38-
private final Iterator<T> iterator;
39-
40-
/**
41-
* Construct a new reader from this iterable (could be a collection), by
42-
* extracting an instance of {@link Iterator} from it.
43-
*
44-
* @param iterable in instance of {@link Iterable}
45-
*
46-
* @see Iterable#iterator()
47-
*/
48-
public IteratorItemReader(Iterable<T> iterable) {
49-
Assert.notNull(iterable, "Iterable argument cannot be null!");
50-
this.iterator = iterable.iterator();
51-
}
52-
53-
/**
54-
* Construct a new reader from this iterator directly.
55-
* @param iterator an instance of {@link Iterator}
56-
*/
57-
public IteratorItemReader(Iterator<T> iterator) {
58-
Assert.notNull(iterator, "Iterator argument cannot be null!");
59-
this.iterator = iterator;
60-
}
61-
62-
/**
63-
* Implementation of {@link ItemReader#read()} that just iterates over the
64-
* iterator provided.
65-
*/
66-
@Override
67-
public T read() {
68-
if (iterator.hasNext())
69-
return iterator.next();
70-
else
71-
return null; // end of data
72-
}
73-
74-
}
1+
/*
2+
* Copyright 2006-2019 the original author or authors.
3+
*
4+
* Licensed under the Apache License, Version 2.0 (the "License");
5+
* you may not use this file except in compliance with the License.
6+
* You may obtain a copy of the License at
7+
*
8+
* http://www.apache.org/licenses/LICENSE-2.0
9+
*
10+
* Unless required by applicable law or agreed to in writing, software
11+
* distributed under the License is distributed on an "AS IS" BASIS,
12+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
* See the License for the specific language governing permissions and
14+
* limitations under the License.
15+
*/
16+
17+
package org.springframework.batch.item.support;
18+
19+
import java.util.Iterator;
20+
21+
import org.springframework.batch.item.ItemReader;
22+
import org.springframework.util.Assert;
23+
24+
/**
25+
* An {@link ItemReader} that pulls data from a {@link Iterator} or
26+
* {@link Iterable} using the constructors.
27+
*
28+
* @author Juliusz Brzostek
29+
* @author Dave Syer
30+
* @author Mahmoud Ben Hassine
31+
*/
32+
public class IteratorItemReader<T> implements ItemReader<T> {
33+
34+
/**
35+
* Internal iterator
36+
*/
37+
private final Iterator<T> iterator;
38+
39+
/**
40+
* Construct a new reader from this iterable (could be a collection), by
41+
* extracting an instance of {@link Iterator} from it.
42+
*
43+
* @param iterable in instance of {@link Iterable}
44+
*
45+
* @see Iterable#iterator()
46+
*/
47+
public IteratorItemReader(Iterable<T> iterable) {
48+
Assert.notNull(iterable, "Iterable argument cannot be null!");
49+
this.iterator = iterable.iterator();
50+
}
51+
52+
/**
53+
* Construct a new reader from this iterator directly.
54+
* @param iterator an instance of {@link Iterator}
55+
*/
56+
public IteratorItemReader(Iterator<T> iterator) {
57+
Assert.notNull(iterator, "Iterator argument cannot be null!");
58+
this.iterator = iterator;
59+
}
60+
61+
/**
62+
* Implementation of {@link ItemReader#read()} that just iterates over the
63+
* iterator provided.
64+
*/
65+
@Override
66+
public T read() {
67+
if (iterator.hasNext())
68+
return iterator.next();
69+
else
70+
return null; // end of data
71+
}
72+
73+
}

spring-batch-infrastructure/src/main/java/org/springframework/batch/item/support/builder/ClassifierCompositeItemWriterBuilder.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2017 the original author or authors.
2+
* Copyright 2017-2019 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -19,13 +19,13 @@
1919
import org.springframework.batch.item.ItemWriter;
2020
import org.springframework.batch.item.support.ClassifierCompositeItemWriter;
2121
import org.springframework.classify.Classifier;
22-
import org.springframework.classify.ClassifierSupport;
2322
import org.springframework.util.Assert;
2423

2524
/**
2625
* Creates a fully qualified ClassifierCompositeItemWriter.
2726
*
2827
* @author Glenn Renfro
28+
* @author Mahmoud Ben Hassine
2929
*
3030
* @since 4.0
3131
*/

0 commit comments

Comments
 (0)