Github user StephanEwen commented on the pull request:
https://github.com/apache/flink/pull/1030#issuecomment-142014348
I reworked this quite heavily during merging. There were a lot of issues
that were against good Java style:
- Variables in the classes, rather than in methods
- The way references to threads were obtained
- Defining clear parameter checks and exceptions
- Handling InterruptedExceptions
- polling versus clear conditions when state can be checked
You can have a look at the code after my fixes, to see these issues in
context.
I would suggest to get a Java book (like "Effective Java", that is a good
one) and take this as a guideline for future work. This pull request took more
than 70 comments and still needed quite some rework (not for Flink-specific
issues, but all of it general Java style/efficiency/correctness). I am afraid
we cannot do that for every pull request, it would be completely overwhelming...
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---