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
Adds the missing nullable generic bound to the zero-argument DataFetcherResult.newResult() factory method.
Allows Kotlin callers under JSpecify null-marked semantics to use nullable result types.
Adds a regression source for Kotlin nullable type interoperability.
Problem:
DataFetcherResult and its Builder allow nullable type parameters.
The zero-argument newResult() method declared an unbounded T.
Kotlin therefore interpreted the factory method type parameter as non-null and rejected nullable types.
Testing:
./gradlew compileTestKotlin failed before the Java change with Type argument is not within its bounds for DataFetcherResult.newResult<String?>().
./gradlew compileTestKotlin passed after the change.
./gradlew test --tests graphql.execution.DataFetcherResultTest passed: 26 tests.
./gradlew check -x test -x testng passed.
./gradlew javadoc passed.
./gradlew testng passed: 190 tests.
./gradlew test was run locally on Windows and failed in unrelated graphql.parser.MultiSourceReaderTest.can combine files; the failure reproduces when that test is run alone and appears tied to local checkout line endings for src/test/resources/multisource/a.txt (w/crlf).
andimarek
changed the title
Fix nullable bound on DataFetcherResult.newResult
Backport to 26: Fix nullable bound on DataFetcherResult.newResult
Aug 19, 2026
Full HTML report: build artifact jacoco-html-report
Updated: 2026-08-19 21:13:45 UTC
andimarek
changed the title
Backport to 26: Fix nullable bound on DataFetcherResult.newResult
Backport to 26.1: Fix nullable bound on DataFetcherResult.newResult
Aug 20, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Backport of #4418 to the
26.xmaintenance branch.Summary:
DataFetcherResult.newResult()factory method.Problem:
DataFetcherResultand itsBuilderallow nullable type parameters.newResult()method declared an unboundedT.Testing:
./gradlew compileTestKotlinfailed before the Java change withType argument is not within its boundsforDataFetcherResult.newResult<String?>()../gradlew compileTestKotlinpassed after the change../gradlew test --tests graphql.execution.DataFetcherResultTestpassed: 26 tests../gradlew check -x test -x testngpassed../gradlew javadocpassed../gradlew testngpassed: 190 tests../gradlew testwas run locally on Windows and failed in unrelatedgraphql.parser.MultiSourceReaderTest.can combine files; the failure reproduces when that test is run alone and appears tied to local checkout line endings forsrc/test/resources/multisource/a.txt(w/crlf).Issue:
Fixes #4364