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 — Remove incorrect @Nullable from GraphQLSchema.getCodeRegistry() by andimarek · Pull Request #4247 · graphql-java/graphql-java

Conversation

@andimarek

@andimarek andimarek commented Feb 15, 2026

Copy link
Copy Markdown
Member

Summary

  • Remove @Nullable annotation from GraphQLSchema.codeRegistry field and getCodeRegistry() return type
  • Fix first-pass constructor to use builder.codeRegistry instead of discarding it and setting the field to null

Why

The field was annotated @Nullable and the first-pass constructor (private GraphQLSchema(Builder)) set this.codeRegistry = null — despite asserting builder.codeRegistry was non-null on the line above. All three constructors require a non-null codeRegistry, and no fully-constructed schema ever exposes a null value.

The @Nullable annotation was misleading and caused downstream code to add unnecessary null checks (e.g. schema.getCodeRegistry() != null guards in validation).

Test plan

  • Full test suite passes

🤖 Generated with Claude Code

Sorry, something went wrong.

Uh oh!

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

All reactions
@andimarek @claude
Remove incorrect @nullable from GraphQLSchema.getCodeRegistry()
3359e8d
The codeRegistry field was annotated @nullable and the first-pass
constructor set it to null, even though it asserted the builder value
was non-null. All three constructors require a non-null codeRegistry,
and no fully-constructed schema ever has a null codeRegistry.

Fix the first-pass constructor to use the builder's codeRegistry
instead of discarding it, and remove @nullable from the field and
getter.

Co-Authored-By: Claude Opus 4.6 <[email protected]>
@andimarek
andimarek merged commit bd87652 into master Feb 15, 2026
7 checks passed

Uh oh!

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

@andimarek andimarek added this to the 26.x is a breaking change release (other fixes as well) milestone Feb 15, 2026
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

26.x is a breaking change release (ot...

Development

Successfully merging this pull request may close these issues.

Uh oh!

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

1 participant

@andimarek
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.