microsoft / microsoft/vscode-java-test
Cannot invoke "org.eclipse.jdt.core.dom.ASTNode.getParent()"
Open
Nobody has claimed this yet.
ai-triaged
bug
high-priority
test-discovery
- Dominant language
- TypeScript
- Stars
- 340
- Forks
- 173
- Avg merge
- 1d 19h
- Merged PRs (30d)
- 18
Description
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)
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
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.
Assessment
- Tech stack
- java
- Domain
- testing
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100