redhat-developer / redhat-developer/vscode-java
Wrong reported errors by compiler
Chưa có ai nhận issue này.
- 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 have some pieces of code that compiles fine in IntelliJ and Gradle but VSCode reports them as errors.
Examples:
-
Error in import
import sun.security.ssl.ProtocolVersion;

I have to point that I'm not using the JVM in the error description. Here's my workspace's settings:
{
"java.home": "/Users/augusto.dias/.sdkman/candidates/java/8.0.181-oracle",
"java.jdt.ls.vmargs": "-javaagent:/Users/augusto.dias/my-project/.vscode/lombok.jar -Xbootclasspath/a:/Users/augusto.dias/my-project/.vscode/lombok.jar"
}
- Wrong exception handling
I have a RetryTemplate class from spring and I'm calling execute as the following example:
retryTemplate.execute(getCallback(),getRecovery());
private RetryCallback<Void, IOException> getCallback() {
return context -> {
if (context.getLastThrowable() instanceof IOException) {
IOException e = (IOException) context.getLastThrowable();
// do some other things
throw e;
}
return null;
};
}
private RecoveryCallback getRecovery() {
return context -> {
Throwable lastThrowable = context.getLastThrowable();
// do some other things
throw lastThrowable instanceof Exception ? (Exception) lastThrowable : new Exception(lastThrowable);
}
}

- And finally: false error in method signature
assertThat((List) ((Envelope) responseEntity.getBody()).getData(), hasItems(siteDTO));
assertThat((List) ((Envelope) responseEntity.getBody()).getData(), hasSize(1));

Environment
- Operating System: macOS Mojave
- JDK version: 1.8
- Visual Studio Code version: 1.29.1
- Java extension version: 0.34.0
Hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- 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.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Hướng nghiên cứu
Bắt đầu bằng cách tái hiện ba chẩn đoán đã được báo cáo trong các đoạn mã Java được cung cấp bằng cách sử dụng cài đặt workspace, JDK 1.8, VS Code 1.29.1 và Java extension 0.34.0. So sánh kết quả của language server với IntelliJ và Gradle, sau đó xác định riêng xem mỗi lỗi giả có cùng nguyên nhân hay không. Được xem là hoàn tất khi các ví dụ bị ảnh hưởng không còn tạo ra các chẩn đoán không chính xác và có kiểm thử hồi quy cho các trường hợp đã 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, vscode
- Lĩnh vực
- devtools
- Loại issue
- Lỗi
- Độ khó
- 4/5
- Thời gian dự kiến
- 3-5 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