Details
-
Type:
Improvement
-
Status: Resolved
-
Priority:
Trivial
-
Resolution: Fixed
-
Affects Version/s: 2.20.1
-
Fix Version/s: 2.21.0
-
Component/s: None
-
Labels:None
-
Estimated Complexity: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