IN PROGRESS - BATCH-712: Upgrade ItemReaders to use Parameterized types

This commit is contained in:
robokaso
2008-07-18 11:32:12 +00:00
parent e6a08ac88f
commit 4a91a00854

View File

@@ -6,7 +6,7 @@ import org.springframework.batch.item.support.AbstractItemReader;
/** /**
* {@link ItemReader} with hard-coded input data. * {@link ItemReader} with hard-coded input data.
*/ */
public class ExampleItemReader extends AbstractItemReader { public class ExampleItemReader extends AbstractItemReader<String> {
private String[] input = {"Hello world!", null}; private String[] input = {"Hello world!", null};
@@ -15,7 +15,7 @@ public class ExampleItemReader extends AbstractItemReader {
/** /**
* Reads next record from input * Reads next record from input
*/ */
public Object read() throws Exception { public String read() throws Exception {
return input[index++]; return input[index++];
} }