Menu

#1495 [java] UnnecessaryLocalBeforeReturn with assert

PMD-5.4.4
closed
None
PMD
3-Major
Bug
UnnecessaryLocalBeforeReturn
2017-01-28
2016-06-21
rei3ner
No

I checked UnnecessaryLocalBeforeReturn with the following code:

int res = xxx; assert res>=0;
return res;

This should be ok.
I think the assertion is ignored.

Discussion

  • Andreas Dangel

    Andreas Dangel - 2017-01-08
    • summary: UnnecessaryLocalBeforeReturn with assert --> [java] UnnecessaryLocalBeforeReturn with assert
     
  • Andreas Dangel

    Andreas Dangel - 2017-01-28
    • status: open --> in-progress
    • assigned_to: Andreas Dangel
    • Milestone: New Tickets --> PMD-5.4.4
     
  • Andreas Dangel

    Andreas Dangel - 2017-01-28
    • status: in-progress --> closed
     
  • Andreas Dangel

    Andreas Dangel - 2017-01-28

    Thanks for reporting!
    This bug will be fixed with PMD 5.4.4, 5.5.3 and later.

     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.