[
https://issues.apache.org/jira/browse/CAMEL-12059?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16289006#comment-16289006
]
ASF GitHub Bot commented on CAMEL-12059:
----------------------------------------
Github user oscerd closed the pull request at:
https://github.com/apache/camel/pull/2129
> Remove redundant null checks from instanceof checks
> ---------------------------------------------------
>
> Key: CAMEL-12059
> URL: https://issues.apache.org/jira/browse/CAMEL-12059
> Project: Camel
> Issue Type: Improvement
> Affects Versions: 2.20.1
> Reporter: Marc Carter
> Assignee: Andrea Cosentino
> Priority: Trivial
> Fix For: 2.21.0
>
>
> 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
--
This message was sent by Atlassian JIRA
(v6.4.14#64029)