redhat-developer / redhat-developer/vscode-java

TypeError: Cannot set properties of undefined (setting 'text')

Đang mở
#2,701 1 bình luận 0 reaction 0 người được giao Xem trên GitHub

Chưa có ai nhận issue này.

extension-start
Ngôn ngữ chính
TypeScript
Star
2.3k
Fork
546
Merge trung bình
20 giờ 1 phút
Pull request đã merge (30 ngày)
11

Mô tả

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:

https://github.com/redhat-developer/vscode-java/blob/d6a2fd53b97f8518ece92cbae4d4b580c1aafe69/src/languageStatusItemFactory.ts#L146

@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.

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Hướng nghiên cứu

Bắt đầu tại src/languageStatusItemFactory.ts#L146 và so sánh với lệnh gọi cập nhật được hiển thị trong stack trace. Điều tra cách item có thể là undefined và liệu việc thay item: any bằng một kiểu TypeScript cụ thể có làm lộ ra vấn đề hay không. Hoàn thành có nghĩa là xác định được nguyên nhân và ngăn TypeError đã được báo cáo xảy ra.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Đánh giá

Công nghệ
typescript, vscode
Lĩnh vực
developer-experience, devtools
Loại issue
Lỗi
Độ khó
3/5
Thời gian dự kiến
1-2 ngày
Mức độ hoạt động
Đình trệ
Độ rõ ràng
Cần làm rõ
Mức phù hợp với người mới
25/100

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.