[pmd-devel] [ pmd-Bugs-3496028 ] pmd-4.2.6: MissingBreakInSwitch fails to report violation
A source code analyzer
Brought to you by:
adangel,
juansotuyo
From: SourceForge.net <no...@so...> - 2012-05-28 06:19:01
|
Bugs item #3496028, was opened at 2012-03-01 08:52 Message generated for change (Comment added) made by adangel You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=479921&aid=3496028&group_id=56262 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: pmd Group: PMD-5.1.x >Status: Closed >Resolution: Fixed Priority: 7 Private: No Submitted By: Gordie (gbgrout) >Assigned to: Andreas Dangel (adangel) Summary: pmd-4.2.6: MissingBreakInSwitch fails to report violation Initial Comment: PMD 4.2.6 does not report a violation of MissingBreakInSwitch when analyzing the following source: switch (s) { case 0 : s2 = s ; case 1 : s2 = (short)(s + 1); break; default : s2 = (short)(s + 2); } This is much worse than a false positive since the bug goes undetected. ---------------------------------------------------------------------- >Comment By: Andreas Dangel (adangel) Date: 2012-05-27 23:19 Message: This will be fixed with PMD 5.1. Thanks for the bug report. ---------------------------------------------------------------------- Comment By: Romain PELISSE (rpelisse) Date: 2012-03-01 11:41 Message: Hi, Thanks for your report. I have indeed reproduce the issue, using our test framework. I have sadly no time to investigate this for now, but if you have an idea for a fix, do not hesitate to submit a patch - I'll take the time to review it and apply it. I've committed your test case. ---------------------------------------------------------------------- Comment By: Gordie (gbgrout) Date: 2012-03-01 08:54 Message: Because this is more serious than a false positive, and those are currently judged to be priority 5, I am upping this to 7. I just found a defect in our product today that PMD did not detect as a violation of this rule. ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=479921&aid=3496028&group_id=56262 |