fix build warnings

This commit is contained in:
Mahmoud Ben Hassine
2018-08-10 12:02:23 +02:00
parent e5ac0e9975
commit 76c34c7f72
26 changed files with 71 additions and 42 deletions

View File

@@ -17,14 +17,14 @@ package org.springframework.batch.item.xml;
import org.springframework.core.io.ClassPathResource;
import org.springframework.oxm.Marshaller;
import org.springframework.oxm.castor.CastorMarshaller;
public class CastorMarshallingTests extends AbstractStaxEventWriterItemWriterTests {
@Override
protected Marshaller getMarshaller() throws Exception {
CastorMarshaller marshaller = new CastorMarshaller();
@SuppressWarnings("deprecation")
org.springframework.oxm.castor.CastorMarshaller marshaller = new org.springframework.oxm.castor.CastorMarshaller();
// marshaller.setTargetClass(Trade.class);
marshaller.setMappingLocation(new ClassPathResource("mapping-castor.xml", getClass()));
// there is no way to call

View File

@@ -17,13 +17,13 @@ package org.springframework.batch.item.xml;
import org.springframework.core.io.ClassPathResource;
import org.springframework.oxm.Unmarshaller;
import org.springframework.oxm.castor.CastorMarshaller;
public class CastorUnmarshallingTests extends AbstractStaxEventReaderItemReaderTests {
@Override
protected Unmarshaller getUnmarshaller() throws Exception {
CastorMarshaller unmarshaller = new CastorMarshaller();
@SuppressWarnings("deprecation")
org.springframework.oxm.castor.CastorMarshaller unmarshaller = new org.springframework.oxm.castor.CastorMarshaller();
unmarshaller.setMappingLocation(new ClassPathResource("mapping-castor.xml", getClass()));
// alternatively target class can be set
//unmarshaller.setTargetClass(Trade.class);