Skip to content

Conversation

sptz45
Copy link

@sptz45 sptz45 commented Jan 25, 2023

We need to do that cause if we have a faulty Redis server that has issues with connections the reconnect-on-error functionality of those methods can result in StackOverflowError.

We had to create a private method for each send(..) method cause simply adding @tailrec would produce the following compiler error: "could not optimize @tailrec annotated method send: it is neither private nor final so can be overridden". We also opted for adding private methods instead of defining them inside each method in order to make fewer changes and better preserve the git history.

We need to do that cause if we have a faulty Redis server that has
issues with connections the reconnect-on-error functionality of those
methods can result in `StackOverflowError`.

We had to create a private method for each `send(..)` method cause simply
adding `@tailrec` would produce the following compiler error: "could not
optimize @tailrec annotated method send: it is neither private nor final
so can be overridden". We also opted for adding private methods instead
of defining them inside each method in order to make fewer changes and
better preserve the git history.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant