Updated for various code warnings

This commit addresses a number of deprications and other code warnings.
There are still many more to address, but this is a start.
This commit is contained in:
Michael Minella
2017-04-21 16:20:46 -05:00
parent a2a856e64b
commit 263e978a1f
128 changed files with 658 additions and 680 deletions

View File

@@ -15,11 +15,18 @@
*/
package org.springframework.batch.core.test.ldif;
import java.io.BufferedReader;
import java.io.File;
import java.io.FileInputStream;
import java.io.InputStreamReader;
import java.net.MalformedURLException;
import org.junit.Before;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.batch.core.ExitStatus;
import org.springframework.batch.core.Job;
import org.springframework.batch.core.JobExecution;
@@ -34,12 +41,6 @@ import org.springframework.test.context.ContextConfiguration;
import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
import org.springframework.util.Assert;
import java.io.BufferedReader;
import java.io.File;
import java.io.FileInputStream;
import java.io.InputStreamReader;
import java.net.MalformedURLException;
@RunWith(SpringJUnit4ClassRunner.class)
@ContextConfiguration(locations = { "/simple-job-launcher-context.xml", "/applicationContext-test2.xml"})
public class MappingLdifReaderTests {
@@ -78,7 +79,7 @@ public class MappingLdifReaderTests {
//Check output.
Assert.isTrue(actual.exists(), "Actual does not exist.");
Assert.isTrue(compareFiles(expected.getFile(), actual.getFile()));
Assert.isTrue(compareFiles(expected.getFile(), actual.getFile()), "Files were not equal");
}
@Test

View File

@@ -79,7 +79,7 @@ public class DataSourceInitializer implements InitializingBean, DisposableBean {
@Override
public void afterPropertiesSet() throws Exception {
Assert.notNull(dataSource);
Assert.notNull(dataSource, "A DataSource is required");
logger.info("Initializing with scripts: "+Arrays.asList(initScripts));
if (!initialized && initialize) {
try {