Housecleaning of build warnings
This commit is contained in:
@@ -15,8 +15,6 @@
|
||||
*/
|
||||
package org.springframework.batch.sample;
|
||||
|
||||
import static org.junit.Assert.assertEquals;
|
||||
|
||||
import java.io.FileInputStream;
|
||||
import java.io.IOException;
|
||||
import java.math.BigDecimal;
|
||||
@@ -24,12 +22,12 @@ import java.sql.ResultSet;
|
||||
import java.sql.SQLException;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import javax.sql.DataSource;
|
||||
|
||||
import org.apache.commons.io.IOUtils;
|
||||
import org.junit.Test;
|
||||
import org.junit.runner.RunWith;
|
||||
|
||||
import org.springframework.batch.sample.domain.trade.Trade;
|
||||
import org.springframework.batch.test.JobLauncherTestUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
@@ -39,6 +37,8 @@ import org.springframework.jdbc.core.RowCallbackHandler;
|
||||
import org.springframework.test.context.ContextConfiguration;
|
||||
import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
|
||||
|
||||
import static org.junit.Assert.assertEquals;
|
||||
|
||||
@RunWith(SpringJUnit4ClassRunner.class)
|
||||
@ContextConfiguration(locations = { "/simple-job-launcher-context.xml", "/jobs/compositeItemWriterSampleJob.xml", "/job-runner-context.xml" })
|
||||
public class CompositeItemWriterSampleFunctionalTests {
|
||||
@@ -105,7 +105,7 @@ public class CompositeItemWriterSampleFunctionalTests {
|
||||
|
||||
private void checkOutputFile(String fileName) throws IOException {
|
||||
@SuppressWarnings("resource")
|
||||
List<String> outputLines = IOUtils.readLines(new FileInputStream(fileName));
|
||||
List<String> outputLines = IOUtils.readLines(new FileInputStream(fileName), "UTF-8");
|
||||
|
||||
String output = "";
|
||||
for (String line : outputLines) {
|
||||
|
||||
@@ -16,11 +16,10 @@
|
||||
|
||||
package org.springframework.batch.sample;
|
||||
|
||||
import static org.junit.Assert.assertEquals;
|
||||
|
||||
import org.apache.commons.io.IOUtils;
|
||||
import org.junit.Test;
|
||||
import org.junit.runner.RunWith;
|
||||
|
||||
import org.springframework.batch.test.JobLauncherTestUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.core.io.FileSystemResource;
|
||||
@@ -29,6 +28,8 @@ import org.springframework.test.context.ContextConfiguration;
|
||||
import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
|
||||
import org.springframework.util.StringUtils;
|
||||
|
||||
import static org.junit.Assert.assertEquals;
|
||||
|
||||
@RunWith(SpringJUnit4ClassRunner.class)
|
||||
@ContextConfiguration(locations = { "/simple-job-launcher-context.xml", "/jobs/multilineJob.xml",
|
||||
"/job-runner-context.xml" })
|
||||
@@ -47,7 +48,7 @@ public class MultilineJobFunctionalTests {
|
||||
@Test
|
||||
public void testJobLaunch() throws Exception {
|
||||
jobLauncherTestUtils.launchJob();
|
||||
assertEquals(EXPECTED_RESULT, StringUtils.replace(IOUtils.toString(output.getInputStream()), System
|
||||
assertEquals(EXPECTED_RESULT, StringUtils.replace(IOUtils.toString(output.getInputStream(), "UTF-8"), System
|
||||
.getProperty("line.separator"), ""));
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user