redhat-developer / redhat-developer/vscode-java
TypeError: Cannot set properties of undefined (setting 'text')
未关闭
还没有人认领这个 Issue。
extension-start
- 主要语言
- TypeScript
- 星标
- 2.3k
- 派生
- 546
- 平均合并
- 20 小时 1 分钟
- 30 天内合并 PR
- 11
描述
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.
贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
调研方向
从 src/languageStatusItemFactory.ts#L146 开始,并将其与堆栈跟踪中显示的更新调用进行比较。调查 item 如何可能为 undefined,以及将 item: any 替换为特定的 TypeScript 类型是否能暴露该问题。完成的标准是确定原因并防止报告的 TypeError。
由索引模型根据 Issue 内容生成。
评估
- 技术栈
- typescript, vscode
- 领域
- developer-experience, devtools
- Issue 类型
- 缺陷
- 难度
- 3/5
- 预计耗时
- 1-2 天
- 活跃度
- 停滞
- 描述清晰度
- 需要澄清
- 新手友好度
- 25/100