spring-projects / spring-batch-extensions

Spring Batch Extensions
242 stars 258 forks source link

Add support for resetting the currentSheet index to 0 upon doClose() #11

Closed codelirium closed 3 years ago

codelirium commented 9 years ago

Hello mdeinum,

Have a look @ https://github.com/spring-projects/spring-batch-extensions/pull/14

I think there is one more state variable that needs resetting plus I updated the unit tests.

Kindest regards, Stavros Lekkas (@codelirium)

codelirium commented 9 years ago

Hello @mminella, would that be possible to review and merge #14 ?

mminella commented 9 years ago

Why is doing this via a new instance using step scope not good enough? I ask since that's the way just about every other reader works...

codelirium commented 9 years ago

I might sound weird to you but:

1) I thought reusing the same reader adds up to flexibility. 2) I did not want to create a separate reader bean tight to every additional pass I want to make to the excel file - in cases where more than one additional passes are required.

mminella commented 9 years ago

Do you have an example of where this approach is preferred than the step one I'm proposing?

codelirium commented 9 years ago

I am afraid I do not. I just felt reusing the reader in the product I rolled out last month.

mdeinum commented 3 years ago

Fixed in #65.