# Jump statements should not be redundant (squid:S3626) FP in try block

**URL:** <https://community.sonarsource.com/t/jump-statements-should-not-be-redundant-squid-s3626-fp-in-try-block/8185>\
**Category:** Report False-positive / False-negative...\
**Tags:** java\
**Created:** [March 27, 2019, 1:05pm UTC](https://community.sonarsource.com/t/jump-statements-should-not-be-redundant-squid-s3626-fp-in-try-block/8185 "2019-03-27T13:05:56Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Alix](https://dub1.discourse-cdn.com/sonarsource/user_avatar/community.sonarsource.com/alix/32/2460_2.png) [@Alix](https://community.sonarsource.com/u/Alix)\
**Post date:** [March 27, 2019, 1:05pm UTC](https://community.sonarsource.com/t/jump-statements-should-not-be-redundant-squid-s3626-fp-in-try-block/8185/1 "2019-03-27T13:05:56Z")

</div>

SonarQube version: 6.7.6 LTS (build 38781)  
Java Plugin version: 5.11 (build 17289)

```auto
    void foo(boolean b) {
        try {
            if (b) {
                System.out.println("work block A");
            } else {
                return;
            }
        } finally {
            System.out.println("work block B");
        }
        System.out.println("work block C");
    }

```

squid:S3626 triggers on the line with the return statement.  
If the return statement is removed then work block C will be executed.

---

<div class="post-metadata">

**Author:** ![Nicolas\_Peru](https://dub1.discourse-cdn.com/sonarsource/user_avatar/community.sonarsource.com/nicolas_peru/32/22_2.png) [@Nicolas\_Peru](https://community.sonarsource.com/u/Nicolas_Peru)\
**Post date:** [July 11, 2019, 10:17am UTC](https://community.sonarsource.com/t/jump-statements-should-not-be-redundant-squid-s3626-fp-in-try-block/8185/2 "2019-07-11T10:17:56Z")

</div>

Hi,

If I understand correctly you are hitting a variation of : [https://jira.sonarsource.com/browse/SONARJAVA-3058](https://jira.sonarsource.com/browse/SONARJAVA-3058)

Thanks for the reproducer, i’ll add it to the ticket !

---

<div class="post-metadata">

**Author:** ![system](https://dub1.discourse-cdn.com/sonarsource/user_avatar/community.sonarsource.com/system/32/31083_2.png) [@system](https://community.sonarsource.com/u/system)\
**Post date:** [April 8, 2021, 9:26am UTC](https://community.sonarsource.com/t/jump-statements-should-not-be-redundant-squid-s3626-fp-in-try-block/8185/3 "2021-04-08T09:26:58Z")

</div>

Closed on April 8, 2021, 9:26am UTC

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.
