[Java] FN in S2293

29 views
Skip to first unread message

Johan "Johnnei"

unread,
Nov 3, 2017, 4:19:08 PM11/3/17
to SonarQube
Hello SonarSource Team,

I'd like to report a FN in squid:S2293 for Java.

public class Violation {
 
public void violate() {
   
List<String> values = Arrays.asList("Stop", "pointing", "fingers", "steve");
   
delete(new ArrayList<String>(values)); // Noncompliant [[sc=26;ec=32]]
 
}

 
private void delete(List<String> strings) {
   
// Do this.
 
}
}

On [1] I've run the analysis with SonarJava 4.15.0.12310 on SonarQube 6.7-RC1.
In the actual case the 'delete' is a call to a service (in another file) with similar signature but this already enough to reproduce the FN.

[1] https://sonarqube.johnnei.org/code?id=org.johnnei%3Asonarqube-bugs%3As2293&selected=org.johnnei%3Asonarqube-bugs%3As2293%3Asrc%2Fmain%2Fjava%2Forg%2Fjohnnei%2Fsonarqube%2FViolation.java

Kind regards,

Johan.

Michael Gumowski

unread,
Nov 10, 2017, 4:30:53 AM11/10/17
to Johan "Johnnei", SonarQube
Hey Johan,

Thanks for the feedback! Ticket created to handle it: SONARJAVA-2549

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/ee580e06-dd2f-4246-beec-b1370b1e4a95%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
--
Michael Gumowski | SonarSource
Software Developer, Language Team
https://www.sonarsource.com

Johan Tiesinga

unread,
Nov 10, 2017, 12:40:05 PM11/10/17
to Michael Gumowski, SonarQube
Hey Michael,

Great, thanks!

Kind regards,

Johan.
Reply all
Reply to author
Forward
0 new messages