redhat-developer / redhat-developer/vscode-java
Copy of #1251 - Unsupported SuppressWarnings("restriction")
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 2.3k
- Forks
- 546
- Avg merge
- 20h 1m
- Merged PRs (30d)
- 11
Description
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
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Reproduce the issue in VS Code using the private JRE and the Java extension version described, following the import and @SuppressWarnings("restriction") steps. Start by tracing how the Java extension reports access-restriction diagnostics; done means the suppression is recognized and the import is no longer reported as an error.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java, typescript, vscode
- Domain
- developer-experience, devtools
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100