Inspectopedia Help

Same file subclasses are missing from permits clause of a sealed class

Reports sealed classes whose permits clauses do not contain some of the subclasses from the same file.


sealed class A {} final class B extends A {}

After the quick-fix is applied:

sealed class A permits B {} final class B extends A {}

New in 2020.3

Inspection Details

Available in:

IntelliJ IDEA 2023.3, Qodana for JVM 2023.3


Java, 233.SNAPSHOT

Last modified: 13 July 2023