Skip to content

fix: null-safe fragment access in DefaultFragmentWithOverride.checkConfiguration#1386

Merged
joaodinissf merged 1 commit into
dsldevkit:masterfrom
joaodinissf:fix/defaultfragmentwithoverride-null-guard
Jun 1, 2026
Merged

fix: null-safe fragment access in DefaultFragmentWithOverride.checkConfiguration#1386
joaodinissf merged 1 commit into
dsldevkit:masterfrom
joaodinissf:fix/defaultfragmentwithoverride-null-guard

Conversation

@joaodinissf

Copy link
Copy Markdown
Collaborator

DefaultFragmentWithOverride.defaultFragment / overrideFragment are documented as optionally null ("or nothing if it is null"), and generate() and initialize() access them null-safely with ?.. checkConfiguration() dereferenced them unconditionally → NPE whenever either is null. Added ?. to match the rest of the class.

Found by a repo-wide inconsistency sweep.

🤖 Generated with Claude Code

…nfiguration

defaultFragment and overrideFragment are documented as optionally null, and
generate() and initialize() both access them null-safely (?.). checkConfiguration
dereferenced them unconditionally, NPEing whenever either is null. Use ?. to
match the rest of the class.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@joaodinissf joaodinissf marked this pull request as ready for review May 30, 2026 16:00
@joaodinissf joaodinissf enabled auto-merge (rebase) May 30, 2026 16:35
@joaodinissf joaodinissf merged commit 676a78c into dsldevkit:master Jun 1, 2026
4 checks passed
@joaodinissf joaodinissf deleted the fix/defaultfragmentwithoverride-null-guard branch June 1, 2026 07:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants