| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
Sorry, something went wrong.
| "graphql.validation.ValidationError", | ||
| "graphql.validation.ValidationErrorClassification", | ||
| "graphql.validation.ValidationErrorType", | ||
| // These classes will not be public API later, exempt here while marked as experimental |
There was a problem hiding this comment.
There is an edge case where some classes have been annotated with "Experimental API" for the purposes of the defer work. They won't become public API later so I made a note in the JSpecify exemption rule
Sorry, something went wrong.
| private final List<SourceLocation> locations; | ||
| private final Map<String, Object> extensions; | ||
| private final List<Object> path; | ||
| private final @Nullable List<SourceLocation> locations; |
There was a problem hiding this comment.
The builder creates a non-nullable list, but that's only if the builder is called
Sorry, something went wrong.
| * @return a value or null | ||
| */ | ||
| public <T> T get(Object key) { | ||
| public <T> @Nullable T get(Object key) { |
There was a problem hiding this comment.
TODO: another case of the nullable generic issue
Sorry, something went wrong.
There was a problem hiding this comment.
Update - all values stored in the GraphQLContext are non-null. It's only going to return null if the key is not found. Let's keep it like this.
Sorry, something went wrong.
| */ | ||
| @SuppressWarnings("unchecked") | ||
| public <T> T getObject() { | ||
| public @Nullable <T> T getObject() { |
There was a problem hiding this comment.
TODO: another generic nullable check
Sorry, something went wrong.
There was a problem hiding this comment.
Edit: object should also be nullable
Sorry, something went wrong.
There was a problem hiding this comment.
I updated the prompt with more information on generics
Sorry, something went wrong.
|
I had a fix a bunch of tests when I changed Validation Error messages to be non-nullable This is as per the spec - messages in GraphQL errors must be present |
Sorry, something went wrong.
# Conflicts: # src/main/java/graphql/schema/GraphQLSchema.java
|
Special note for release notes: ValidationError technically has a breaking change, now a description must be not-nullable, which is consistent with the specification Previously there was a mismatch that ValidationError didn't enforce description. However that doesn't make much sense, if a user receives a validation error they should also receive a description to help explain and diagnose the error |
Sorry, something went wrong.
| @@ -0,0 +1,59 @@ | |||
| The task is to annotate public API classes (marked with `@PublicAPI`) with JSpecify nullability annotations. | |||
There was a problem hiding this comment.
This prompt is checked in so subagents can all share this context
This prompt will be deleted after this series of JSpecify annotations is completed
Sorry, something went wrong.
| Back | FazBrowse Home | New Git URL |
We have many classes left to go for JSpecify, so rather than one class at a time I will do the remainder in large bundles. This adds annotations on ~50 classes.
The general recipe here is
What will be in a future PR: better Kotlin tooling as reported recently in #4179