Inspectopedia Help

Illegal dependency on internal package

Reports references in modules without module-info.java on packages which are not exported from named modules.

Such configuration may occur when some modules in the project are already migrated to Java modules but others are still non-modular. By analogy to the JDK, such non-modular code should not get access to the code in named modules which is not explicitly exported.

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.

IllegalDependencyOnInternalPackage
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 | JVM languages

Availability

By default bundled with

IntelliJ IDEA 2024.1, Qodana for JVM 2024.1,

Can be installed with plugin

Java, 241.18072

Last modified: 18 June 2024