Inspectopedia Help

Dependencies on automatic modules

Reports usages of automatic modules in a requires directive.

An automatic module is unreliable since it can depend on the types on the class path, and its name and exported packages can change if it's converted into an explicit module.

Corresponds to -Xlint:requires-automatic and -Xlint:requires-transitive-automatic Javac options. The first option increases awareness of when automatic modules are used. The second warns the authors of a module that they're putting the users of that module at risk by establishing implied readability to an automatic module.


// module org.printer { requires transitive; // reported in case '' is an automatic module }

Use the Highlight only transitive dependencies option to warn only about transitive dependencies.

Inspection options




Highlight only transitive dependencies



Inspection Details

Available in:

IntelliJ IDEA 2023.3, Qodana for JVM 2023.3


Java, 233.SNAPSHOT

Last modified: 13 July 2023