-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Add JSpecify annotations to 10 classes in graphql.execution package #4225
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Add JSpecify annotations to 10 classes in graphql.execution package #4225
Conversation
# Conflicts: # src/main/java/graphql/relay/DefaultConnectionCursor.java # src/main/java/graphql/relay/DefaultEdge.java # src/main/java/graphql/relay/SimpleListConnection.java
Co-authored-by: dondonz <[email protected]>
Co-authored-by: dondonz <[email protected]>
Co-authored-by: dondonz <[email protected]>
| return this; | ||
| } | ||
| return parent; | ||
| return assertNotNull(parent, "parent should not be null for non-root path"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
TODO: check this
|
|
||
| public String getSegmentName() { | ||
| return (String) segment; | ||
| return (String) assertNotNull(segment, "segment should not be null"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
TODO: check if we want these asserts here
| } | ||
|
|
||
| return self.isRootPath() && that.isRootPath(); | ||
| return (self == null || self.isRootPath()) && (that == null || that.isRootPath()); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
TODO: double check this change in return statement
Annotates 10 classes in
graphql.executionpackage with JSpecify nullability markers, following the established pattern in the codebase.Annotated Classes
ResultNodesInfoResultPath- nullableparent/segmentfields, nullable returns forgetParent()anddropSegment()SimpleDataFetcherExceptionHandlerSubscriptionExecutionStrategy- nullable return formkReactivePublisher()UnknownOperationException- nullable return forgetLocations()UnresolvedTypeExceptionconditional.ConditionalNodeDecisiondirectives.QueryAppliedDirective- nullabledefinitionfielddirectives.QueryAppliedDirectiveArgument- nullabledefinitionfield, nullable generic return forgetValue()directives.QueryDirectivesImplementation
@NullMarkedat class/interface level@NullUnmarked@Nullableannotations to nullable fields and return types@NonNullannotations (now implicit under@NullMarked)assertNotNullguards inResultPathandSubscriptionExecutionStrategyfor NullAway complianceJSpecifyAnnotationsCheck.groovyExample
Original prompt
This pull request was created from Copilot chat.
✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.