[JAVA] squid:S2189 Add an end condition to this loop - False Positive - while(true) loop which has return statement inside a catch block

815 views
Skip to first unread message

Adam Gabryś

unread,
Nov 5, 2016, 6:37:57 AM11/5/16
to SonarQube

Hi,
Java Plugin reported a False Positive for while(true) loop which has return statement inside a catch block

Rule: https://sonarqube.com/coding_rules#rule_key=squid%3AS2189

Environment:

  • SonarQube 6.1
  • Java Plugin 4.2.1.6971

Links to code:

Best Regards,
Adam Gabryś

Michael Gumowski

unread,
Nov 10, 2016, 11:12:21 AM11/10/16
to Adam Gabryś, SonarQube
Hey Adam,

Thanks for your (extremely well detailed - and that's really appreciated!) feedback!
It's of course a FP, as there is definitely a way outside the loop.

Ticket created to handle the issue: SONARJAVA-1944

Cheers,
Michael

--
You received this message because you are subscribed to the Google Groups "SonarQube" group.
To unsubscribe from this group and stop receiving emails from it, send an email to sonarqube+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/sonarqube/BLU436-SMTP2533336BB1F05819A5CA7F998A50%40phx.gbl.
For more options, visit https://groups.google.com/d/optout.
--

Michael GUMOWSKI | SonarSource
Software Developer @ Language Team
http://sonarsource.com
Reply all
Reply to author
Forward
0 new messages