spotbugs / sonar-findbugs

SpotBugs plugin for SonarQube
352 stars 135 forks source link

Please update to fb-contrib 7.4.6 - fixes false positives in Java 11 #281

Closed doyledavidson closed 4 years ago

doyledavidson commented 5 years ago

Issue Description

Current version of fb-contrib 7.4.3 has false positives when run against Java 11 compile code. PCOA_PARTIALLY_CONSTRUCTED_OBJECT_ACCESS is one example (Constructor makes call to non-final method). 7.4.6 corrects this

SonarQube analysis reports new false positives when project starts compiling with target language level Java 11 due to fb-contrib.

reports "fb-contrib:PCOA_PARTIALLY_CONSTRUCTED_OBJECT_ACCESS" bug

Environment

SonarQube 7.6+

public class MyClass { private int i; public MyClass() { initVars(); // this should be ok } private void initVars() { i = 1; } }

KengoTODA commented 5 years ago

please propose your fix for this pom file, but it seems that there is no release for SpotBugs?

There is a tag named v7.4.6.sb but we have no 7.4.6.sb release at Maven central...

doyledavidson commented 5 years ago

So I tested/verified using standalone spotbugs 3.1.12 GUI with the 7.4.6 fb-contrib plugin jar. Do you requires a ".sb" value for the "fbcontrib.version" version for sonar-findbugs? (line 55 in the POM)