Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
cjhetzle opened this issue Feb 3, 2023 · 0 comments
Open

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

cjhetzle opened this issue Feb 3, 2023 · 0 comments

Comments

@cjhetzle
Copy link

cjhetzle commented Feb 3, 2023

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants