Fix compiler warnings

This commit is contained in:
Dave Syer
2011-04-05 12:02:13 +01:00
parent d8c85036ab
commit e0ce10dcc0
7 changed files with 14 additions and 18 deletions

View File

@@ -12,7 +12,7 @@ public class XStreamUnmarshallingTests extends AbstractStaxEventReaderItemReader
protected Unmarshaller getUnmarshaller() throws Exception {
XStreamMarshaller unmarshaller = new XStreamMarshaller();
Map<String,Class> aliasesMap = new HashMap<String,Class>();
Map<String,Class<?>> aliasesMap = new HashMap<String,Class<?>>();
aliasesMap.put("trade", Trade.class);
aliasesMap.put("isin", String.class);
aliasesMap.put("customer", String.class);

View File

@@ -32,7 +32,6 @@ import javax.xml.stream.XMLEventWriter;
import javax.xml.stream.XMLOutputFactory;
import javax.xml.stream.XMLStreamException;
import javax.xml.transform.Result;
import javax.xml.transform.Source;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;

View File

@@ -61,6 +61,7 @@ public abstract class StaxUtils {
private static Method staxUtilsSourceMethodOnSpring30, staxUtilsResultMethodOnSpring30;
@SuppressWarnings("rawtypes")
private static Constructor staxSourceClassCtorOnSpringWs15, staxResultClassCtorOnSpringWs15;
static {

View File

@@ -1,6 +1,15 @@
package org.springframework.batch.item.file;
import java.io.IOException;
import java.util.Comparator;
import javax.xml.stream.XMLEventReader;
import javax.xml.stream.events.Attribute;
import javax.xml.stream.events.StartElement;
import javax.xml.transform.Source;
import junit.framework.Assert;
import org.junit.internal.runners.JUnit4ClassRunner;
import org.junit.runner.RunWith;
import org.springframework.batch.item.AbstractItemStreamItemReaderTests;
@@ -14,15 +23,6 @@ import org.springframework.core.io.Resource;
import org.springframework.oxm.Unmarshaller;
import org.springframework.oxm.XmlMappingException;
import javax.xml.stream.XMLEventReader;
import javax.xml.stream.XMLStreamException;
import javax.xml.stream.events.Attribute;
import javax.xml.stream.events.StartElement;
import javax.xml.transform.Source;
import java.io.IOException;
import java.util.Comparator;
//import org.springframework.xml.transform.StaxSource;
@RunWith(JUnit4ClassRunner.class)
public class MultiResourceItemReaderXmlTests extends AbstractItemStreamItemReaderTests {

View File

@@ -8,7 +8,6 @@ import java.util.Arrays;
import javax.xml.stream.XMLEventFactory;
import javax.xml.stream.XMLEventWriter;
import javax.xml.stream.XMLStreamException;
import javax.xml.transform.Result;
import org.junit.Before;

View File

@@ -1,18 +1,16 @@
package org.springframework.batch.item.xml;
import static org.junit.Assert.*;
import static org.junit.Assert.assertTrue;
import java.io.IOException;
import org.junit.runner.RunWith;
import org.junit.internal.runners.JUnit4ClassRunner;
import javax.xml.stream.XMLEventReader;
import javax.xml.stream.XMLStreamException;
import javax.xml.stream.events.Attribute;
import javax.xml.stream.events.StartElement;
import javax.xml.transform.Source;
import org.junit.internal.runners.JUnit4ClassRunner;
import org.junit.runner.RunWith;
import org.springframework.batch.item.AbstractItemStreamItemReaderTests;
import org.springframework.batch.item.ExecutionContext;
import org.springframework.batch.item.ItemReader;

View File

@@ -27,7 +27,6 @@ import org.springframework.transaction.PlatformTransactionManager;
import org.springframework.transaction.TransactionStatus;
import org.springframework.transaction.support.TransactionCallback;
import org.springframework.transaction.support.TransactionTemplate;
import org.springframework.util.Assert;
import org.springframework.util.ClassUtils;
import org.springframework.util.StringUtils;