SonarQube and squidS2095 with Java 8

I have a problem with SonarQube. Code below

StreamSupport.stream(var, false).mapToInt().collect(..); 

does not comply with the rule

squid: S2095 Resources must be closed

What can I do to tell SonarQube not to scan functions from Java 8 to this rule?

+5
source share
1 answer

I have found the answer. This is a known bug:

https://jira.sonarsource.com/browse/SONARJAVA-1478

+7
source

Source: https://habr.com/ru/post/1245687/


All Articles