Inspectopedia
 
2024.3

Throwable supplier never returns a value

Warning
New
Last modified: 03 December 2024

Reports Supplier lambdas in Optional.orElseThrow() calls that throw an exception, instead of returning it.

Example:

After the quick-fix is applied:

New in 2023.1