redhat-developer / redhat-developer/vscode-java
TypeError: Cannot set properties of undefined (setting 'text')
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 2.3k
- Forks
- 546
- Avg merge
- 20h 1m
- Merged PRs (30d)
- 11
Description
I see below error message in console when spring-petclinic is opened. Not sure about how to reproduce it. But some potential NPE must be there.
TypeError: Cannot set properties of undefined (setting 'text')
at Object.e.update (c:\Users\admin\.vscode\extensions\redhat.java-1.10.0-win32-x64\dist\extension.js:2:724923)
at Object.<anonymous> (c:\Users\admin\.vscode\extensions\redhat.java-1.10.0-win32-x64\dist\extension.js:2:768615)
at Generator.next (<anonymous>)
at o (c:\Users\admin\.vscode\extensions\redhat.java-1.10.0-win32-x64\dist\extension.js:2:764166)
Location should be:
@CsCherrYY Can you take a look?
BTW if possible, can we replace item: any to leverage the type check, which would be good to prevent such error.
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 src/languageStatusItemFactory.ts#L146 and compare it with the update call shown in the stack trace. Investigate how the item can be undefined and whether replacing item: any with a specific TypeScript type exposes the problem. Done means identifying the cause and preventing the reported TypeError.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript, vscode
- Domain
- developer-experience, devtools
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100