ResourceLineReader did not need to implement ItemStream
This commit is contained in:
@@ -10,7 +10,7 @@ public abstract class CommonDatabaseItemStreamItemReaderTests extends CommonItem
|
||||
private ClassPathXmlApplicationContext ctx;
|
||||
|
||||
protected void setUp() throws Exception {
|
||||
ctx = new ClassPathXmlApplicationContext("foo-data-source-context.xml", JdbcCursorItemReaderCommonTests.class);
|
||||
ctx = new ClassPathXmlApplicationContext("org/springframework/batch/item/database/data-source-context.xml");
|
||||
super.setUp();
|
||||
}
|
||||
|
||||
|
||||
@@ -66,9 +66,9 @@ public class ResourceLineReaderTests extends TestCase {
|
||||
Resource resource = new ByteArrayResource("a,b,c\n1,2,3".getBytes());
|
||||
ResourceLineReader reader = new ResourceLineReader(resource);
|
||||
reader.open();
|
||||
reader.close(null);
|
||||
reader.close();
|
||||
try {
|
||||
reader.close(null); // just closing a BufferedReader twice should be fine
|
||||
reader.close(); // just closing a BufferedReader twice should be fine
|
||||
} catch (Exception e) {
|
||||
fail("Unexpected Exception "+e);
|
||||
}
|
||||
@@ -181,7 +181,7 @@ public class ResourceLineReaderTests extends TestCase {
|
||||
Resource resource = new ByteArrayResource("1\n# 2\n3".getBytes());
|
||||
ResourceLineReader reader = new ResourceLineReader(resource);
|
||||
reader.read();
|
||||
reader.close(null);
|
||||
reader.close();
|
||||
reader.mark();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user