redhat-developer / redhat-developer/vscode-java

Copy of #1251 - Unsupported SuppressWarnings("restriction")

未关闭
#2,918 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

还没有人认领这个 Issue。

compile diagnostics enhancement
主要语言
TypeScript
星标
2.3k
派生
547
平均合并
20 小时 1 分钟
30 天内合并 PR
11

描述

I am using a private JRE with its included libraries. As I import these I am given an error for Restricted Access since these are private APIs. If I were in Eclipse I could add @SuppressWarnings("restriction") and get rid of it.

That same class opened in VSCode will show the import as still an error and the '@SuppressWarnings' as "unnecessary".

Environment
  • Operating System: OS X 13.2
  • JDK version: Standard Edition (build 1.8.0_341-b10 13_Jul_2022_11_14 Mac OS X x64(SR7 FP15))
  • Visual Studio Code version: 1.75.0
  • Java extension version: 1.14.0
  1. Import a private API like from Sun
  2. Receive an "Access Restriction" Error
  3. Add @SuppressWarnings("restriction") to top of class declaration
Screenshot 2023-02-03 at 12 36 59

贡献指南

打开贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

调研方向

在 VS Code 中使用私有 JRE 和所述版本的 Java extension 重现该问题,并按照 import 和 @SuppressWarnings("restriction") 的步骤操作。首先跟踪 Java extension 如何报告访问限制诊断;当 suppression 被识别且 import 不再被报告为错误时,即表示完成。

由索引模型根据 Issue 内容生成。

评估

技术栈
java, typescript, vscode
领域
developer-experience, devtools
Issue 类型
缺陷
难度
3/5
预计耗时
1-2 天
活跃度
停滞
描述清晰度
基本清楚
新手友好度
35/100

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。