Skip to content

Comments

An empty DQL variable will no longer produce a null pointer exception#100

Merged
dorian-krefft-dt merged 1 commit intomainfrom
bugfix/dql/empty-variables
Jan 29, 2026
Merged

An empty DQL variable will no longer produce a null pointer exception#100
dorian-krefft-dt merged 1 commit intomainfrom
bugfix/dql/empty-variables

Conversation

@dorian-krefft-dt
Copy link
Collaborator

No description provided.

@dorian-krefft-dt dorian-krefft-dt self-assigned this Jan 29, 2026
Copilot AI review requested due to automatic review settings January 29, 2026 14:47
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR fixes a null pointer exception that occurred when creating an empty DQL variable using the $type: dql syntax. The fix adds null checking before dereferencing potentially null objects and returns a multiline comment placeholder instead of crashing.

Changes:

  • Added null safety checks in createUnknownElement method to prevent NPE
  • Updated CHANGELOG.md with bug fix and feature notes
  • Added @NotNull annotation to method return type for clarity

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

File Description
src/main/java/pl/thedeem/intellij/dql/psi/DQLElementFactory.java Added null checks and fallback to multiline comment to prevent NPE when creating empty DQL variables
CHANGELOG.md Documented the bug fix and added UI improvement feature notes

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@github-actions
Copy link
Contributor

Qodana for JVM

It seems all right 👌

No new problems were found according to the checks applied

💡 Qodana analysis was run in the pull request mode: only the changed files were checked

View the detailed Qodana report

To be able to view the detailed Qodana report, you can either:

To get *.log files or any other Qodana artifacts, run the action with upload-result option set to true,
so that the action will upload the files as the job artifacts:

      - name: 'Qodana Scan'
        uses: JetBrains/qodana-action@v2025.3.1
        with:
          upload-result: true
Contact Qodana team

Contact us at qodana-support@jetbrains.com

@dorian-krefft-dt dorian-krefft-dt merged commit 7048b0a into main Jan 29, 2026
9 checks passed
@dorian-krefft-dt dorian-krefft-dt deleted the bugfix/dql/empty-variables branch January 29, 2026 23:25
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.

1 participant