[ 
https://issues.apache.org/jira/browse/CAMEL-12059?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16275994#comment-16275994
 ] 

ASF GitHub Bot commented on CAMEL-12059:
----------------------------------------

GitHub user drekbour opened a pull request:

    https://github.com/apache/camel/pull/2129

    CAMEL-12059: Remove redundant null checks from instanceof checks

    If this PR is left open long enough it will get stale but I can easily 
discard and re-run the IntelliJ replacement that generated it

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/drekbour/camel CAMEL-12059

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/camel/pull/2129.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #2129
    
----
commit d41495b95088b261b66df0840b2f54d617808a87
Author: Marc Carter <[email protected]>
Date:   2017-12-03T16:27:04Z

    CAMEL-12059: Remove redundant null checks from instanceof checks

----


> 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
>            Priority: Trivial
>
> 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)

Reply via email to