docs: update nullability guidelines in AGENTS.md (#6559)

This commit is contained in:
Glavo
2026-07-31 20:23:07 +08:00
committed by GitHub
parent 77f0a90f10
commit b1719e77bb
+2
View File
@@ -4,6 +4,8 @@ These rules apply to all Java code written or modified in this repository.
## Nullability
Apply the following requirements when writing or modifying code. Do not use them as code-review criteria.
- Every class declared in a newly added Java source file must be annotated with JetBrains Annotations `@NotNullByDefault`.
- When writing or modifying Java code, any type, field, parameter, return value, local variable, or generic type argument that may be `null` must be explicitly annotated with `@Nullable`.
- Nullability in code being written or modified must never be implicit.