Usages of API which isn't available at the configured language level
Reports usages of the API that is unavailable at the configured language level. This inspection does 3 things:
Highlight usage of generified classes when the language level is below Java 7.
Highlight when default methods are not overridden and the language level is below Java 8.
Highlight usage of API when the language level is lower than marked using the
@since
tag in the documentation.
Locating this inspection
- By ID
Can be used to locate inspection in e.g. Qodana configuration files, where you can quickly enable or disable it, or adjust its settings.
Since15- Via Settings dialog
Path to the inspection settings via IntelliJ Platform IDE Settings dialog, when you need to adjust inspection settings directly from your IDE.
Use the Forbid API usages option to forbid usages of the API in respect to the project or custom language level.
Inspection options
Here you can find the description of settings available for the Usages of API which isn't available at the configured language level inspection, and the reference of their default values.
- Forbid usages of API newer than
Default setting: (according to project settings)
Other available settings:
1.3 - Plain old Java
1.4 - 'assert' keyword
5 - 'enum' keyword, generics, autoboxing, etc.
6 - @Override in interfaces
7 - Diamonds, ARM, multi-catch, etc.
8 - Lambdas, type annotations, etc.
9 - Modules, private methods in interfaces, etc.
10 - Local variable type inference
11 - Local variable syntax for lambda parameters
12 - No new language features
13 - No new language features
14 - Switch expressions
15 - Text blocks
16 - Records, patterns, local enums and interfaces
17 - Sealed types, always-strict floating-point semantics
17 (Preview) - Unsupported
18 - JavaDoc snippets
18 (Preview) - Unsupported
19 - No new language features
19 (Preview) - Unsupported
20 - No new language features
20 (Preview) - Unsupported
21 - Record patterns, pattern matching for switch
21 (Preview) - String templates, unnamed classes and instance main methods, etc.
22 - Unnamed variables and patterns
22 (Preview) - Statements before super(), string templates (2nd preview), etc.
23 - Markdown documentation comments
23 (Preview) - Primitive types in patterns, implicitly declared classes, etc.
X - Experimental features
Inspection Details | |
---|---|
By default bundled with: | |
Can be installed with plugin: | Java, 242.22892 |