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.
Example:
//module-info.java
module org.printer {
requires transitive drivers.corp.org; // reported in case 'drivers.corp.org' is an automatic module
}
- 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.
JavaRequiresAutoModule
Use the Highlight only transitive dependencies option to warn only about transitive dependencies.
This inspection depends on the Java feature 'Modules', which is available since Java 9.
Here you can find the description of settings available for the Dependencies on automatic modules inspection, and the reference of their default values.
Inspection Details | |
---|---|
By default bundled with: | |
Can be installed with plugin: | Java, 243.23126 |
Thanks for your feedback!