Skip to content

Dummy-proof the source? #67

@romoore

Description

@romoore

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions