Skip to content

NPE in FailedBatchProcessor if Reported Index is Out of Bounds #2558

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
garyrussell opened this issue Jan 24, 2023 · 0 comments · Fixed by #2559
Closed

NPE in FailedBatchProcessor if Reported Index is Out of Bounds #2558

garyrussell opened this issue Jan 24, 2023 · 0 comments · Fixed by #2559

Comments

@garyrussell
Copy link
Contributor

Can't log the record here because there is none...

if (index < 0 || index >= data.count()) {
this.logger.warn(batchListenerFailedException, () ->
String.format("Record not found in batch: %s-%d@%d; re-seeking batch",
record.topic(), record.partition(), record.offset()));

@garyrussell garyrussell added this to the 3.0.3 milestone Jan 24, 2023
@garyrussell garyrussell self-assigned this Jan 24, 2023
garyrussell added a commit to garyrussell/spring-kafka that referenced this issue Jan 25, 2023
Resolves spring-projects#2558

If a user throws a `BatchListenerExcecutionFailedException` with an invalid
`index`, an NPE is logged instead of the true error.

**cherry-pick to 2.9.x**
artembilan pushed a commit that referenced this issue Jan 25, 2023
Resolves #2558

If a user throws a `BatchListenerExcecutionFailedException` with an invalid
`index`, an NPE is logged instead of the true error.

**cherry-pick to 2.9.x**
artembilan pushed a commit that referenced this issue Jan 25, 2023
Resolves #2560

If a user throws a `BatchListenerExcecutionFailedException` with an invalid
`index`, an NPE is logged instead of the true error.

**cherry-pick to 2.9.x**
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant