redhat-developer / redhat-developer/vscode-java
Copy of #1251 - Unsupported SuppressWarnings("restriction")
未关闭
还没有人认领这个 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
- Import a private API like from Sun
- Receive an "Access Restriction" Error
- Add
@SuppressWarnings("restriction")to top of class declaration
贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 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