Return or assignment can be lifted out
try statements that can be converted to expressions by lifting the
return statement or an assignment out.
After the quick-fix is applied:
If you would like this inspection to highlight more complex code with multi-statement branches, uncheck the option "Report only if each branch is a single statement".
Report only if each branch is a single statement
IntelliJ IDEA 2023.3, Qodana for JVM 2023.3