GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Fix nullable bound on DataFetcherResult.newResult by exijn · Pull Request #4418 · graphql-java/graphql-java

Conversation

@exijn

@exijn exijn commented Jul 17, 2026

Copy link
Copy Markdown
Contributor

Summary:

  • 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).

Issue:
Fixes #4364

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

Syer10 reacted with thumbs up emoji
All reactions
  • 👍 1 reaction
@exijn
Fix nullable bound on DataFetcherResult.newResult
66110bb
@yonatang yonatang mentioned this pull request Aug 13, 2026
DataFetcherResult.newResult<T>() type parameter missing @Nullable bound for Kotlin JSpecify interop #4364
Closed
@exijn
Merge branch 'master' into fix/4364-data-fetcher-result-nullability
14cf4c9
@github-actions

github-actions Bot commented Aug 13, 2026

Copy link
Copy Markdown
Contributor

Test Report

Test Results

Java Version Total Passed Failed Errors Skipped
Java 11 5927 (±0) 5871 (±0) 0 (±0) 0 (±0) 56 (±0)
Java 17 5927 (±0) 5870 (±0) 0 (±0) 0 (±0) 57 (±0)
Java 21 5927 (±0) 5870 (±0) 0 (±0) 0 (±0) 57 (±0)
Java 25 5927 (±0) 5870 (±0) 0 (±0) 0 (±0) 57 (±0)
jcstress 32 (±0) 32 (±0) 0 (±0) 0 (±0) 0 (±0)
Total 23740 (±0) 23513 (±0) 0 (±0) 0 (±0) 227 (±0)

Code Coverage (Java 25)

Metric Covered Missed Coverage vs Master
Lines 30047 3121 90.6% ±0.0%
Branches 8785 1519 85.3% ±0.0%
Methods 8026 1206 86.9% ±0.0%

No per-class coverage changes detected.

Full HTML report: build artifact jacoco-html-report

Updated: 2026-08-13 23:48:57 UTC

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@bbakerman
bbakerman merged commit caf4d79 into graphql-java:master Aug 14, 2026
10 checks passed

Uh oh!

There was an error while loading. Please reload this page.

@andimarek andimarek mentioned this pull request Aug 19, 2026
Backport to 26.1: Fix nullable bound on DataFetcherResult.newResult #4443
Merged
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

No reviews

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

DataFetcherResult.newResult<T>() type parameter missing @Nullable bound for Kotlin JSpecify interop

Uh oh!

There was an error while loading. Please reload this page.

2 participants

@exijn @bbakerman
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.
You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.