Inspectopedia
 
2024.3

Forward compatibility

Warning
New
Last modified: 03 December 2024

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:

Fixing these issues timely may simplify migration to future Java versions.