Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

  • All public classes and methods should have informative Javadoc comments.
  • Code should be formatted according to hama-code-formatter
  • Contributions should pass existing unit tests.
  • New unit tests should be provided to demonstrate bugs and fixes.
  • Please resolve all warnings according to "Eclipse Warning Levels" below

Generating a patch

Please make sure that all unit tests succeed before constructing your patch and that no new javac compiler warnings are introduced by your patch.

...

  • Variables should be meaningful so that they are easily understood by other developers. For instance, the declaration of 'String serverName' would be better than 'String str'.
  • Indentation is 2 spaces, not 4.
  • Argument checks for NullPointerException, IlleagalArgumentException, etc.

Eclipse Warning Levels

We expect that you turn on following warnings in eclipse:
(can be found in the project preferences or global preferences under Java/Compiler/"Errors/Warnings")

No Format

From top to bottom:

Non-static access to static member (WARNING)
Indirect access to static member (WARNING)
Method with a constructor name (WARNING)
Parameter assignment (WARNING)
Method can be static (WARNING) 

Serializable class without serialID (WARNING)
Assignment has no effect (WARNING)
finally does not complete normally (WARNING)
Using a char array in string concat (WARNING)
hidden catch block (WARNING)
Inexact type match for varags argument (WARNING)
Nullpointer access (WARNING)
Compare identical values (WARNING)
class overrides equals but not hashcode (WARNING)
dead code (WARNING)

Type parameter hides another type (WARNING)
Method does not override package visible method (WARNING)
interface method conflicts with protected object method (WARNING)

Deprecated API (WARNING) // can be neglected by using annotations if not other possible though 
Forbidden references (ERROR)
Discouraged references (WARNING)

Value of local variable is not used (WARNING) // please delete it if never read
Unused import (WARNING) // please format and organize imports before making a patch (in eclipse CTRL+SHIFT+F and CTRL+O)
Unused private member (WARNING) // remove if never used
Unnecessary cast or instanceof operation (WARNING)
Unused break or continue label (WARNING)

Unchecked generic type operation (WARNING)
Usage of raw types (WARNING) // sometimes can not be avoided, can be neglected via annotation
Generic type parameter declared with a final type bound (WARNING)

Missing override annotation (WARNING)
Annotation is used as super interface (WARNING)
Unhandled token in SuppressWarnings (WARNING)

See also