Fix NPE from external completion providers triggered on AI query pane#303
Draft
Copilot wants to merge 2 commits into
Draft
Fix NPE from external completion providers triggered on AI query pane#303Copilot wants to merge 2 commits into
Copilot wants to merge 2 commits into
Conversation
… pane Co-authored-by: jGauravGupta <15934072+jGauravGupta@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Fix NullPointerException on send button in Agent mode
Fix NPE from external completion providers triggered on AI query pane
Mar 17, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
When typing in the Agent mode query pane, jeddict-ai's own completion providers (
AIQueryCompletionProvider,JeddictQueryCompletionProvider) registered fortext/x-javawould trigger the NetBeans completion framework — which then invoked alltext/x-javaproviders, including the externalMicronautDataCompletionProvider. That provider callsCompilationController.get(result)expecting a real Java source backing, getsnull(the query pane has none), and throwsNullPointerException.Changes
AssistantChat.java: Usetext/plainfor thequestionPaneeditor kit instead oftext/x-java. The input pane is free-form text; it has no Java source backing and doesn't need Java-specific providers.AIQueryCompletionProvider: Changed@MimeRegistrationfromtext/x-java→text/plainto stay registered on the query pane.JeddictQueryCompletionProvider: Changed@MimeRegistrationfromtext/x-java→text/plain, and added a guard ingetAutoQueryTypes()so it only triggers auto-completion on editors withJEDDICT_EDITOR_CALLBACKset — preventing it from firing on every plain-text file in the IDE.Warning
Firewall rules blocked me from connecting to one or more addresses (expand for details)
I tried to connect to the following addresses, but was blocked by firewall rules:
openrouter.ai/usr/lib/jvm/temurin-17-jdk-amd64/bin/java /usr/lib/jvm/temurin-17-jdk-amd64/bin/java -javaagent:/home/REDACTED/.m2/repository/org/jacoco/org.jacoco.agent/0.8.12/org.jacoco.agent-0.8.12-runtime.jar=destfile=/home/REDACTED/work/jeddict-ai/jeddict-ai/target/jacoco.exec --add-opens=java.base/java.net=ALL-UNNAMED --add-opens=java.desktop/sun.awt=ALL-UNNAMED --add-opens=java.desktop/sun.awt.X11=ALL-UNNAMED --add-opens=java.desktop/java.awt=ALL-UNNAMED --add-opens=java.base/java.lang.reflect=ALL-UNNAMED --add-opens=java.base/java.lang=ALL-UNNAMED --add-opens=java.base/java.util=ALL-UNNAMED --add-opens=java.desktop/sun.java2d=ALL-UNNAMED --add-exports=java.desktop/sun.java2d=ALL-UNNAMED --add-exports=java.desktop/sun.awt.image=ALL-UNNAMED --add-exports=java.desktop/java.awt.peer=ALL-UNNAMED --add-exports=java.desktop/sun.awt.event=ALL-UNNAMED --add-exports=java.base/sun.security.action=ALL-UNNAMED -jar /home/REDACTED/work/jeddict-ai/jeddict-ai/target/surefire/surefirebooter-20260317154432012_378.jar /home/REDACTED/work/jeddict-ai/jeddict-ai/target/surefire 2026-03-17T15-44-31_067-jvmRun1 surefire-20260317154432012_376tmp(dns block)www.netbeans.org/opt/hostedtoolcache/CodeQL/2.24.3/x64/codeql/tools/linux64/java/bin/java /opt/hostedtoolcache/CodeQL/2.24.3/x64/codeql/tools/linux64/java/bin/java -jar /opt/hostedtoolcache/CodeQL/2.24.3/x64/codeql/xml/tools/xml-extractor.jar --fileList=/tmp/codeql-scratch-cd61c9847ee61009/dbs/java/working/files-to-index12149872662966825360.list --sourceArchiveDir=/tmp/codeql-scratch-cd61c9847ee61009/dbs/java/src --outputDir=/tmp/codeql-scratch-cd61c9847ee61009/dbs/java/trap/java k/jeddict-ai/jeddict-ai/src/main/java/io/github/jeddict/ai/util/FileUtil.java k/_temp/ghcca-node/node/bin/grep implements nse/ToolExecutio17.0.18+8(dns block)If you need me to access, download, or install something from one of these locations, you can either:
📍 Connect Copilot coding agent with Jira, Azure Boards or Linear to delegate work to Copilot in one click without leaving your project management tool.