Skip to content

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

Open
@cjhetzle

Description

@cjhetzle

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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions