BATCH-1837 Spring 3 Compatibility

Update profile to Spring 3.0.7; fix compile issues in 2
tests.
This commit is contained in:
Gary Russell
2012-02-21 19:53:49 -05:00
parent ffc09f6468
commit 1ce4cb1e95
3 changed files with 5 additions and 5 deletions

View File

@@ -88,8 +88,8 @@ public class InlineItemHandlerParserTests {
"org/springframework/batch/core/configuration/xml/InlineItemHandlerWithStepScopeParserTests-context.xml");
StepSynchronizationManager.register(new StepExecution("step", new JobExecution(123L)));
@SuppressWarnings("unchecked")
Map<String,ItemReader<?>> readers = context.getBeansOfType(ItemReader.class);
@SuppressWarnings({ "unchecked", "rawtypes" })
Map<String,ItemReader> readers = context.getBeansOfType(ItemReader.class);
// Should be 2 each (proxy and target) for the two readers in the steps defined
assertEquals(4, readers.size());
// System.err.println(readers);

View File

@@ -54,10 +54,10 @@
<profile>
<id>spring3</id>
<properties>
<spring.framework.version>3.0.5.RELEASE</spring.framework.version>
<spring.framework.version>3.0.7.RELEASE</spring.framework.version>
<spring.oxm.group>org.springframework</spring.oxm.group>
<spring.oxm.artifact>spring-oxm</spring.oxm.artifact>
<spring.oxm.version>3.0.5.RELEASE</spring.oxm.version>
<spring.oxm.version>3.0.7.RELEASE</spring.oxm.version>
<junit.version>4.8.2</junit.version>
</properties>
</profile>

View File

@@ -52,7 +52,7 @@ public class TestMailSender implements MailSender {
}
public void send(SimpleMailMessage[] simpleMessages) throws MailException {
Map<SimpleMailMessage, MessagingException> failedMessages = new LinkedHashMap<SimpleMailMessage, MessagingException>();
Map<Object, Exception> failedMessages = new LinkedHashMap<Object, Exception>();
for (SimpleMailMessage simpleMessage : simpleMessages) {
if (subjectsToFail.contains(simpleMessage.getSubject())) {
failedMessages.put(simpleMessage, new MessagingException());