Issue Details (XML | Word | Printable)

Key: BATCH-593
Type: Bug Bug
Status: Closed Closed
Resolution: Fixed
Priority: Major Major
Assignee: Robert Kasanicky
Reporter: Matthew Hargus
Votes: 0
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
Spring Batch

Calling update before read on DrivingQueryItemReader causes ArrayIndexOutOfBoundsError

Created: 21/Apr/08 01:21 AM   Updated: 07/Aug/08 10:07 AM
Component/s: Infrastructure
Affects Version/s: 1.0.0
Fix Version/s: 1.0.1

Time Tracking:
Not Specified


 Description  « Hide
When calling the update method on the DrivingQueryItemReader to save the state to the execution context, an attempt is made to get the current key by doing a get(currentIndex - 1) on the keys list. Unfortunately, since the read() method has not yet been called, the currentIndex is still at 0, and an ArrayIndexOutOfBoundsError is thrown.

 All   Comments   Work Log   Change History   FishEye   Builds      Sort Order: Ascending order - Click to sort in descending order
Robert Kasanicky added a comment - 21/Apr/08 03:07 AM
fixed by adding condition "currentIndex >0" and added the scenario to the common reader tests

Dave Syer added a comment - 07/Aug/08 10:07 AM
Assume closed as resolved and released