Some of the code could be made "simpler" by not being so clever. An example:
if (key.isConnectable()) if (!communicator.onConnectable()) continue;
Could be rewritten for noobs as
if(key.isConnectable() && !communicator.onConnectable()){
continue;
}
This has 2 advantages:
- A single "if" which is still fail-fast
- Explicit block statements in case nooblets want to change the behavior but don't realize what will be executed and what won't.
Some of the code could be made "simpler" by not being so clever. An example:
Could be rewritten for noobs as
This has 2 advantages: