ResourceLineReader did not need to implement ItemStream

This commit is contained in:
dsyer
2008-07-03 16:55:30 +00:00
parent 7facae9c7a
commit 9c57a5c569
7 changed files with 12 additions and 29 deletions

View File

@@ -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();
}

View File

@@ -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();
}