Skip to content

Latest commit

 

History

History
21 lines (14 loc) · 993 Bytes

File metadata and controls

21 lines (14 loc) · 993 Bytes

Java Code Style Requirements

These rules apply to all Java code written or modified in this repository.

Nullability

  • Annotate every class with JetBrains Annotations @NotNullByDefault.
  • Any type, field, parameter, return value, local variable, or generic type argument that may be null must be explicitly annotated with @Nullable.
  • Nullability must never be implicit.

Immutability

  • Immutable arrays and collections must be explicitly annotated with JetBrains Annotations @Unmodifiable or @UnmodifiableView as appropriate.
  • For arrays, use type-use syntax such as String @Unmodifiable [].

Documentation

  • Every class, field, and method must have documentation.
  • Documentation must use /// Markdown-style Javadoc comments.
  • Keep documentation accurate and specific to the actual behavior, constraints, and side effects.
  • Add concise implementation comments inside complex logic whenever they materially improve readability or explain non-obvious behavior.