Skip to content
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

KAFKA-17994: Checked exceptions are not handled #17817

Open
wants to merge 2 commits into
base: trunk
Choose a base branch
from

Conversation

mjsax
Copy link
Member

@mjsax mjsax commented Nov 14, 2024

While Java distinguished between checked vs unchecked exception, other JVM languages do not. Thus, user code might still throw a checked exception even if no checked exception is declared on the implemented interface.

Should be cherry-picked to 3.9 branch.

While Java distinguished between checked vs unchecked exception,
other JVM languages do not. Thus, user code might still throw
a checked exception even if no checked exception is declared on the
implemented interface.
@mjsax mjsax added the streams label Nov 14, 2024
@github-actions github-actions bot added the small Small PRs label Nov 14, 2024
Copy link
Contributor

@bbejeck bbejeck left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

overalll lgtm, just have a couple of comments

}
return stacktrace;
}

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why remove this?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unused method. side cleanup. (Sorry, should have called it out.)

} catch (final RuntimeException processingException) {
} catch (final Exception processingException) {
// while Java distinguishes checked vs unchecked exceptions, other languages like
// Scala or Kotlin do no, and thus we need to `Exception` to work well with those languages
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit do no -> do not here and below

Copy link
Contributor

@bbejeck bbejeck left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants