Java
Forward compatibility
Warning
New
Last modified: 03 December 2024Reports Java code constructs that may fail to compile in future Java versions.
The following problems are reported:
Uses of
assert
,enum
or_
as an identifierUses of the
var
,yield
, orrecord
restricted identifier as a type nameUnqualified calls to methods named
yield
Modifiers on the
requires java.base
statement inside ofmodule-info.java
Redundant semicolons between import statements
Example:
// This previously legal class does not compile with Java 14,
// as 'yield' became a restricted identifier.
public class yield {}
Fixing these issues timely may simplify migration to future Java versions.
- 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.
ForwardCompatibility
Inspection Details | |
---|---|
By default bundled with: | |
Can be installed with plugin: | Java, 243.23126 |
Thanks for your feedback!
Was this page helpful?