Forward compatibility
Reports Java code constructs that may fail to compile in future Java versions.
The following problems are reported:
Use of
assert
,enum
or_
as an identifierUse of the
var
,yield
, orrecord
restricted identifier as a type nameUnqualified calls to the
yield()
methodModifiers on the
requires java.base
statement inside ofmodule-info.java
Lone semicolons in the import list
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.
Inspection Details | |
---|---|
Available in: | IntelliJ IDEA 2023.3, Qodana for JVM 2023.3 |
Plugin: | Java, 233.SNAPSHOT |
Last modified: 13 July 2023