Inspectopedia Help

Module exports/opens package to itself

Reports packages that are exported to, or opened in the same Java 9 module in which they are defined. The quick-fix removes such directives from


module com.mycomp { exports com.mycomp.main to com.mycomp; }

After the quick-fix is applied:

module main { }

This inspection depends on the Java feature 'Modules' which is available since Java 9.

Inspection Details

Available in:

IntelliJ IDEA 2024.2, Qodana for JVM 2024.2,


Java, 242.SNAPSHOT

Last modified: 20 February 2024