You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jira@kafka.apache.org by GitBox <gi...@apache.org> on 2020/12/15 05:22:14 UTC

[GitHub] [kafka] hachikuji opened a new pull request #9753: KAFKA-10855; Fix non-local return in `KafkaApis.handle`

hachikuji opened a new pull request #9753:
URL: https://github.com/apache/kafka/pull/9753


   The non-local return when `maybeHandleInvalidEnvelope` returns true causes the default error handler to execute after a response has already been sent. This patch rewrites the check as a local return.
   
   ### Committer Checklist (excluded from commit message)
   - [ ] Verify design and implementation 
   - [ ] Verify test coverage and CI build status
   - [ ] Verify documentation (including upgrade notes)
   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [kafka] hachikuji merged pull request #9753: KAFKA-10855; Fix non-local return in `KafkaApis.handle`

Posted by GitBox <gi...@apache.org>.
hachikuji merged pull request #9753:
URL: https://github.com/apache/kafka/pull/9753


   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [kafka] hachikuji commented on pull request #9753: KAFKA-10855; Fix non-local return in `KafkaApis.handle`

Posted by GitBox <gi...@apache.org>.
hachikuji commented on pull request #9753:
URL: https://github.com/apache/kafka/pull/9753#issuecomment-745416188


   I agree returns are dangerous in scala. I'm also not fond of the nesting that often results from avoiding them.


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [kafka] ijuma commented on pull request #9753: KAFKA-10855; Fix non-local return in `KafkaApis.handle`

Posted by GitBox <gi...@apache.org>.
ijuma commented on pull request #9753:
URL: https://github.com/apache/kafka/pull/9753#issuecomment-745301797


   Yeah, I agree that using `return` in Scala is dangerous and should be avoided in most cases.


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org