Inspectopedia Help

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 identifier

  • Use of the var, yield, or record restricted identifier as a type name

  • Unqualified calls to the yield() method

  • Modifiers on the requires java.base statement inside of

  • Lone semicolons in the import list


// 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


Java, 233.SNAPSHOT

Last modified: 13 July 2023