You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
5. Method implementations that return null or check for null
13
+
6. GraphQL specification details (see details below)
14
+
15
+
## GraphQL Specification Compliance
16
+
This is a GraphQL implementation. When determining nullability, consult the GraphQL specification (https://spec.graphql.org/draft/) for the relevant concept. Key principles:
17
+
18
+
The spec defines which elements are required (non-null) vs optional (nullable). Look for keywords like "MUST" to indicate when an element is required, and conditional words such as "IF" to indicate when an element is optional.
19
+
20
+
If a class implements or represents a GraphQL specification concept, prioritize the spec's nullability requirements over what IntelliJ inferred.
21
+
22
+
## How to validate
23
+
Finally, please check all this works by running the NullAway compile check.
24
+
25
+
If you find NullAway errors, try and make the smallest possible change to fix them. If you must, you can use assertNotNull. Make sure to include a message as well.
26
+
27
+
## Formatting Guidelines
28
+
29
+
Do not make spacing or formatting changes. Avoid adjusting whitespace, line breaks, or other formatting when editing code. These changes make diffs messy and harder to review. Only make the minimal changes necessary to accomplish the task.
30
+
31
+
## Cleaning up
32
+
Finally, can you remove this class from the JSpecifyAnnotationsCheck as an exemption
33
+
34
+
You do not need to run the JSpecifyAnnotationsCheck. Removing the completed class is enough.
35
+
36
+
Remember to delete all unused imports when you're done from the class you've just annotated.
37
+
38
+
## Generics Annotations
39
+
40
+
When annotating generic types and methods, follow these JSpecify rules:
41
+
42
+
### Type Parameter Bounds
43
+
44
+
The bound on a type parameter determines whether nullable type arguments are allowed:
45
+
46
+
| Declaration | Allows `@Nullable` type argument? |
returnnewPreparsedDocumentEntry(assertNotNull(parseResult.getSyntaxException(), "Parse result syntax exception cannot be null when failed").toInvalidSyntaxError());
0 commit comments