Java 8 stream not understood by Sonar Way rule set (False positive). It requires to close the stream

497 views
Skip to first unread message

mkapus...@kayak.com

unread,
Mar 17, 2016, 9:17:02 AM3/17/16
to SonarQube
Java 8 streams not understood by Analysis engine. It creates a warning that streams must be closed.

Michael Gumowski

unread,
Mar 17, 2016, 9:26:33 AM3/17/16
to mkapus...@kayak.com, SonarQube
Hi,

Thank you for your feedback.
Which version of the java plugin are you using? Can you provide a small code snippet reproducing the issue?

Regards,

Michael GUMOWSKI | SonarSource
Software Developer @ Language Team
http://sonarsource.com

On 17 March 2016 at 14:17, <mkapus...@kayak.com> wrote:
Java 8 streams not understood by Analysis engine. It creates a warning that streams must be closed.

--
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/bae4d7a1-b1f7-492c-8541-55ac0348b1b5%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Modestas Kapusinskas

unread,
Mar 17, 2016, 10:34:52 AM3/17/16
to Michael Gumowski, SonarQube
Hi, 

I’m using the latest version 
  • 3.11

 private List<HotelProvider> getProvidersFromResult(HotelResult result) {
         return Stream.concat(result.getProviders().stream(), result.getInlineProviders().stream()).collect(Collectors.toList());
    }

KAYAK

Modestas Kapusinskas
Director Engineering

Nicolas Peru

unread,
Mar 21, 2016, 4:36:32 AM3/21/16
to mkapus...@kayak.com, SonarQube
Hi, 
Thanks for the feedback:
This is a known issue that we plan to tackle. 
https://jira.sonarsource.com/browse/SONARJAVA-1478

Cheers,

Le jeu. 17 mars 2016 à 14:17, <mkapus...@kayak.com> a écrit :
Java 8 streams not understood by Analysis engine. It creates a warning that streams must be closed.

--
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/bae4d7a1-b1f7-492c-8541-55ac0348b1b5%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
--
Nicolas PERU | SonarSource
Senior Developer
http://sonarsource.com

Modestas Kapusinskas

unread,
Mar 21, 2016, 5:00:22 AM3/21/16
to Nicolas Peru, SonarQube
Thanks for quick reply!

Looking forward to test new version. What is the best way to report issues with the rules?


KAYAK

Modestas Kapusinskas
Director Engineering

Nicolas Peru

unread,
Mar 21, 2016, 5:19:17 AM3/21/16
to mkapus...@kayak.com, SonarQube
Hi, 
This mailing list is the best way to report issue. Please open a thread by issue, and if possible search on this group or on Jira if your issue has already been reported. 

Cheers, 

Modestas Kapusinskas

unread,
Mar 21, 2016, 5:35:03 AM3/21/16
to Nicolas Peru, SonarQube
Thanks, will do!


KAYAK

Modestas Kapusinskas
Director Engineering

Reply all
Reply to author
Forward
0 new messages