Details
-
Improvement
-
Status: Open
-
Medium
-
Resolution: Unresolved
-
None
-
None
-
None
-
None
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.
Attachments
Gerrit Reviews
| # | Subject | Branch | Project | Status | CR | V |
|---|---|---|---|---|---|---|
| 88652,6 | Fix spotbugs issues in network topologies module | master | transportpce | Status: MERGED | +2 | +1 |
| 89201,1 | Fix spotbugs issues in network topologies module | stable/magnesium | transportpce | Status: MERGED | +2 | +1 |