Cannot invoke "org.eclipse.jdt.core.dom.ASTNode.getParent()"

Open
#1,400 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
25/100
Issue type
Bug
Clarity
Needs clarification
Activity status
Stale
Tech stack
java
Domain
testing

Research direction

Start at TestSearchUtils.findTestTypesAndMethods, following its call from TestDelegateCommandHandler.executeCommand and the ASTNodeSearchUtil.getTypeDeclarationNode stack frame. Reproduce the command that produces this trace and determine why the node is null; done means the reported command no longer throws this NullPointerException.

Written by the indexing model from the issue text.

Description

ai-triaged bug high-priority test-discovery
java.lang.NullPointerException: Cannot invoke "org.eclipse.jdt.core.dom.ASTNode.getParent()" because "node" is null
	at org.eclipse.jdt.internal.corext.dom.ASTNodes.getParent(ASTNodes.java:2491)
	at org.eclipse.jdt.internal.corext.refactoring.structure.ASTNodeSearchUtil.getTypeDeclarationNode(ASTNodeSearchUtil.java:182)
	at com.microsoft.java.test.plugin.util.TestSearchUtils.findTestTypesAndMethods(TestSearchUtils.java:349)
	at com.microsoft.java.test.plugin.handler.TestDelegateCommandHandler.executeCommand(TestDelegateCommandHandler.java:60)
	at org.eclipse.jdt.ls.core.internal.handlers.WorkspaceExecuteCommandHandler$1.run(WorkspaceExecuteCommandHandler.java:215)
Dominant language
TypeScript
Stars
340
Forks
173
Avg merge
1d 2h
Merged PRs (30d)
17

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from microsoft/vscode-java-test

All issues in microsoft/vscode-java-test

Similar issues

More TypeScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.