Inspectopedia Help

Unsafe return statements visitor

Reports unsafe use of JavaRecursiveElementVisitor.visitReturnStatement().

Processing PsiReturnStatements even if they belong to another PsiClass or PsiLambdaExpression is a bug in most cases, and a visitor most probably should implement visitClass() and visitLambdaExpression() methods.

Inspection Details

By default bundled with:

IntelliJ IDEA 2024.1, Qodana for JVM 2024.1,

Can be installed with plugin:

Plugin DevKit, 241.16690

Last modified: 29 April 2024