[ODLPARENT-226] SpotBugs doppelgangers with Checkstyle burdens code. Created: 15/Feb/20  Updated: 27/Mar/20

Status: Open
Project: odlparent
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Improvement Priority: Medium
Reporter: Guillaume Lambert Assignee: Unassigned
Resolution: Unresolved Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified


 Description   

Contrary to checkstyle, SpotBugs SF_SWITCH_FALLTHROUGH check does not detect an intentional commented //fallthrough  in a switch/case structure and reports a warning/error.

To remove this false positive, edu.umd.cs.findbugs.annotations.SuppressFBWarnings needs to be imported so that the
@SuppressFBWarnings("SF_SWITCH_FALLTHROUGH") decorator can be put in front of the related block.

In the example below
https://git.opendaylight.org/gerrit/c/transportpce/+/87675/4/networkmodel/src/main/java/org/opendaylight/transportpce/networkmodel/NetConfTopologyListener.java
doing so burdens the code

As the same check is already better performed by checkstyle, the SF_SWITCH_FALLTHROUGH SpotBugs check (and maybe some others) should probably be removed from ODL-parent.



 Comments   
Comment by Guillaume Lambert [ 27/Mar/20 ]

Moving from bug to improvement, the bug was not confirmed - the problem was a lower case w in  "@SuppressFBWarnings"

Generated at Wed Feb 07 20:27:58 UTC 2024 using Jira 8.20.10#820010-sha1:ace47f9899e9ee25d7157d59aa17ab06aee30d3d.