These rules apply to all Java code written or modified in this repository.
- Annotate every class with JetBrains Annotations
@NotNullByDefault. - Any type, field, parameter, return value, local variable, or generic type argument that may be
nullmust be explicitly annotated with@Nullable. - Nullability must never be implicit.
- Immutable arrays and collections must be explicitly annotated with JetBrains Annotations
@Unmodifiableor@UnmodifiableViewas appropriate. - For arrays, use type-use syntax such as
String @Unmodifiable [].
- 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.