redhat-developer / redhat-developer/vscode-java

org.eclipse.jdt.core.compiler.problem.potentialNullReference preference not taken into account

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

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

bug
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ả

Describe the bug
The value of org.eclipse.jdt.core.compiler.problem.potentialNullReference preference seems to not being taken into account.

To Reproduce
Steps to reproduce the behavior:

  1. Create a settings.prefs file
  2. Add following value to the just created prefs file:
org.eclipse.jdt.core/org.eclipse.jdt.core.compiler.problem.potentialNullReference=ignore
  1. In VSCode, under customizations/vscode/setting, set java.settings.url value pointing to the settings.prefs file just created.
  2. In the PROBLEMS view, any Potential null pointer access: The variable myVar may be null at this location error should disappear, but does not.

Expected behavior
The configuration is obeyed and the specified warnings disappear.

Environment

  • Operating System: DevContainer with mcr.microsoft.com/devcontainers/base Docker image on Debian WSL under Windows 11
  • JDK version: openjdk version "1.8.0_482" as Project Java version and openjdk version "25.0.2" 2026-01-20 LTS as the JVM to be used by the Java Language Server
  • Visual Studio Code version: 1.114.0
  • Java extension version: 1.53.0

Additional Information
Other configuration preferences seems to be working as expected. For example setting org.eclipse.jdt.core/org.eclipse.jdt.core.compiler.problem.deprecation=ignore removes any deprecation warning.

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

Tái hiện vấn đề trong VS Code bằng một tệp settings.prefs chứa tùy chọn potentialNullReference, sau đó so sánh cách xử lý tùy chọn này với tùy chọn deprecation, tùy chọn được cho là hoạt động. Theo dõi đường dẫn cấu hình của tiện ích mở rộng Java hoặc máy chủ ngôn ngữ đối với các tùy chọn này; hoàn tất khi đặt potentialNullReference thành ignore sẽ loại bỏ cảnh báo potential-null được báo cáo.

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

Đánh giá

Công nghệ
java, typescript, vscode
Lĩnh vực
tooling
Loại issue
Lỗi
Độ khó
3/5
Thời gian dự kiến
1-2 ngày
Mức độ hoạt động
Ít trao đổi
Độ rõ ràng
Khá rõ ràng
Mức phù hợp với người mới
55/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.