RESOLVED - issue BATCH-383: Remove Java 5 features from samples

http://jira.springframework.org/browse/BATCH-383
This commit is contained in:
robokaso
2008-03-04 13:35:30 +00:00
parent f73ce3553c
commit ac27e91948
6 changed files with 379 additions and 317 deletions

View File

@@ -68,7 +68,7 @@ public class FixedLengthImportJobFunctionalTests extends AbstractValidatingBatch
trade = (Trade)inputSource.read();
}
catch (Exception e) {
throw new IllegalStateException(e);
throw new IllegalStateException(e.getMessage());
}
assertEquals(trade.getIsin(), rs.getString(2));
assertEquals(trade.getQuantity(),rs.getLong(3));

View File

@@ -43,7 +43,7 @@ public class JobExecutionNotificationPublisherTests extends TestCase {
publisher.onApplicationEvent(new SimpleMessageApplicationEvent(this, "foo"));
assertEquals(1, list.size());
String message = ((Notification) list.get(0)).getMessage();
assertTrue("Message does not contain 'foo': ", message.contains("foo"));
assertTrue("Message does not contain 'foo': ", message.indexOf("foo") > 0);
}
}

View File

@@ -64,7 +64,7 @@ public class JdbcGameDaoIntegrationTests extends AbstractTransactionalDataSource
gameDao.write(game);
Game tempGame = (Game) getJdbcTemplate().queryForObject("SELECT * FROM GAMES where PLAYER_ID=? AND YEAR_NO=?",
new Object[] { game.getId(), Integer.valueOf(game.getYear()) }, new GameRowMapper());
new Object[] { game.getId(), new Integer(game.getYear()) }, new GameRowMapper());
assertEquals(tempGame, game);
}

View File

@@ -54,7 +54,7 @@ public class OrderTransformerTests extends TestCase {
order.setBillingAddress(new Address());
order.setBilling(new BillingInfo());
order.setLineItems(Collections.EMPTY_LIST);
order.setTotalPrice(BigDecimal.TEN);
order.setTotalPrice(new BigDecimal(10));
Object result = converter.transform(order);
assertTrue(result instanceof Collection);
}