Code Style

A few simple rules to follow when contributing to the GPars project:

  1. Prefer final wherever applicable - variables, parameters, methods and classes

  2. Single-statement conditions, else branches or loops don’t need braces - if (cond) latch.countDown()

  3. Place the openning brace on the same line - class Foo {

  4. Follow the common Java/Groovy naming and capitalization conventions

  5. Tab size is four characters

  6. The Code Style IntelliJ IDEA inspection profile is the ultimate guide and verification mechanism for the GPars code base. The regular reports can be checked (after login) at the particular TeamCity page.

  7. Any apidoc for methods with Closure arguments like in Promise.java should declare which arguments are passed into the closure call and which return values (if any) are expected.