-
Notifications
You must be signed in to change notification settings - Fork 1.6k
CommonDelegatingErrorHandler: Missing updateClassifier() in addDelegate() #2826
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
Milestone
Comments
garyrussell
added a commit
to garyrussell/spring-kafka
that referenced
this issue
Oct 9, 2023
Resolves spring-projects#2826 The `addDelegate` method did not update the classifier, so it failed to work when cause chain traversal is enabled. **cherry-pick to 3.0.x, 2.9.x**
This was referenced Oct 9, 2023
artembilan
pushed a commit
that referenced
this issue
Oct 9, 2023
Resolves #2826 The `addDelegate` method did not update the classifier, so it failed to work when cause chain traversal is enabled. **cherry-pick to 3.0.x, 2.9.x** * Do not mutate the delegates field until after the validity check.
artembilan
pushed a commit
that referenced
this issue
Oct 9, 2023
Resolves #2826 The `addDelegate` method did not update the classifier, so it failed to work when cause chain traversal is enabled. **cherry-pick to 3.0.x, 2.9.x** * Do not mutate the delegates field until after the validity check. # Conflicts: # spring-kafka/src/main/java/org/springframework/kafka/listener/CommonDelegatingErrorHandler.java
artembilan
pushed a commit
that referenced
this issue
Oct 9, 2023
Resolves #2826 The `addDelegate` method did not update the classifier, so it failed to work when cause chain traversal is enabled. **cherry-pick to 3.0.x, 2.9.x** * Do not mutate the delegates field until after the validity check. # Conflicts: # spring-kafka/src/main/java/org/springframework/kafka/listener/CommonDelegatingErrorHandler.java
garyrussell
added a commit
to garyrussell/spring-kafka
that referenced
this issue
Oct 9, 2023
Resolves spring-projects#2832 **cherry-pick to 3.0.x, 2.9.x**
garyrussell
added a commit
to garyrussell/spring-kafka
that referenced
this issue
Oct 9, 2023
Resolves spring-projects#2832 **cherry-pick to 3.0.x, 2.9.x**
artembilan
pushed a commit
that referenced
this issue
Oct 9, 2023
Resolves #2832 **cherry-pick to 3.0.x, 2.9.x**
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
While creating a CommonDelegatingErrorHandler I ran (probably) into a bug. I used addDelegate() to add a different errorhandler in case of a specific exception in the cause chain (I set causeChainTraversing to true), but the default errorhandler was triggered instead.
I came to know by checking this source code that in addDelegate() the private method updateClassifier() isn't called. So I used the method setErrorHandlers() instead and now it is working.
https://github.com/spring-projects/spring-kafka/blob/638ee013e1b742c1e0af21b565f1e49af94932da/spring-kafka/src/main/java/org/springframework/kafka/listener/CommonDelegatingErrorHandler.java#L121C16-L121C16
Is this a bug in addDelegate()?
The text was updated successfully, but these errors were encountered: