Inspectopedia 2025.3 Help

Preview Feature warning

Reports usages of Preview Feature APIs, i.e. of a module, package, class, interface, method, constructor, field, or enum constant in the java.* or javax.* namespace annotated with @PreviewFeature.

A preview feature is a new feature of the Java language, Java Virtual Machine, or Java SE API that is fully specified, fully implemented, and is yet impermanent. The notion of a preview feature is defined in JEP 12.

If some piece of code depends on a preview API, it may stop compiling in future JDK versions if the feature is changed or removed.

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.

preview
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 | Compiler issues

The inspection only reports if the language level of the project or module is Preview.

Inspection ID: PreviewFeature

New in 2021.1

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 preview

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.3, Qodana for JVM 2025.3,

Last modified: 03 December 2025