Details
-
Improvement
-
Status: Resolved
-
Trivial
-
Resolution: Fixed
-
2.20.1
-
None
-
None
-
Novice
Description
The null check in
if (exchange.getFromEndpoint() != null && exchange.getFromEndpoint() instanceof DirectEndpoint)
is redundant, this is equivalent to
if (exchange.getFromEndpoint() instanceof DirectEndpoint)
Basic use of IntelliJ Structural Search and Replace with:
$Expr$ != null && $Expr$ instanceof $Type$
finds (and can correct) dozens of examples