Skip to content

Latest commit

 

History

History
31 lines (29 loc) · 2.23 KB

File metadata and controls

31 lines (29 loc) · 2.23 KB

Java Code Style

We use Google's Java Style Guide with the following modifications.

  • License Information (3.1)
    • A license header is not included in individual source files.
  • Import Order (3.3.3)
    • Place java/javax imports in a separate block below other imports.
  • Static Imports (3.3.4)
    • Do not use static imports.
  • Empty Blocks (4.1.3)
    • Braces for empty blocks are on the same line. This includes an empty catch block.
  • Block Indentation (4.2)
    • Use 4 spaces for blocks.
  • Line Length (4.4)
    • Code lines should not exceed 120 characters.
    • Javadocs should not exceed 80 characters.
  • Line Wrapping (4.5)
    • Use 8 spaces for continuation.
  • Vertical Spacing (4.6.1)
    • Include blank lines at the start and end of a class declaration.
  • Horizontal Alignment (4.6.3)
    • Do not align variables (or anything else) in this manner.
  • Annotations (4.8.5)
    • Method annotations are defined on separate lines.
    • Field annotations are defined on the same line.
  • Numeric Literals (4.8.8)
    • Use uppercase letters for type suffixes and hexadecimal characters.
    • Use lowercase letters for bases and exponents (0xFF, 1e9).
  • Unused Exceptions (6.2)
    • Exceptions which are unused should be named ignored.