RESOLVED - issue BATCH-383: Remove Java 5 features from samples
http://jira.springframework.org/browse/BATCH-383
This commit is contained in:
@@ -20,12 +20,12 @@ public class JdbcPlayerSummaryDao extends JdbcDaoSupport implements ItemWriter {
|
||||
|
||||
PlayerSummary summary = (PlayerSummary)output;
|
||||
|
||||
Object[] args = new Object[]{summary.getId(), Integer.valueOf(summary.getYear()),
|
||||
Integer.valueOf(summary.getCompletes()), Integer.valueOf(summary.getAttempts()),
|
||||
Integer.valueOf(summary.getPassingYards()), Integer.valueOf(summary.getPassingTd()),
|
||||
Integer.valueOf(summary.getInterceptions()), Integer.valueOf(summary.getRushes()),
|
||||
Integer.valueOf(summary.getRushYards()), Integer.valueOf(summary.getReceptions()),
|
||||
Integer.valueOf(summary.getReceptionYards()), Integer.valueOf(summary.getTotalTd()) };
|
||||
Object[] args = new Object[]{summary.getId(), new Integer(summary.getYear()),
|
||||
new Integer(summary.getCompletes()), new Integer(summary.getAttempts()),
|
||||
new Integer(summary.getPassingYards()), new Integer(summary.getPassingTd()),
|
||||
new Integer(summary.getInterceptions()), new Integer(summary.getRushes()),
|
||||
new Integer(summary.getRushYards()), new Integer(summary.getReceptions()),
|
||||
new Integer(summary.getReceptionYards()), new Integer(summary.getTotalTd()) };
|
||||
|
||||
getJdbcTemplate().update(INSERT_SUMMARY, args);
|
||||
}
|
||||
|
||||
@@ -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));
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user