Inspectopedia 2025.2 Help

Forward compatibility

Reports Java code constructs that may fail to compile in future Java versions.

The following problems are reported:

  • Uses of assert, enum or _ as an identifier

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

  • Unqualified calls to methods named yield

  • Modifiers on the requires java.base statement inside of module-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.

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.

ForwardCompatibility
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.

Settings or Preferences | Editor | Inspections | Java | Java language level issues

Suppressing Inspection

You can suppress this inspection by placing the following comment marker before the code fragment where you no longer want messages from this inspection to appear:

//noinspection ForwardCompatibility

More detailed instructions as well as other ways and options that you have can be found in the product documentation:

Inspection Details

By default bundled with:

IntelliJ IDEA 2025.2, Qodana for JVM 2025.2,

Last modified: 18 September 2025