| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
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 <noreply@anthropic.com>
| Back | FazBrowse Home | New Git URL |
Summary
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
🤖 Generated with Claude Code