-
Notifications
You must be signed in to change notification settings - Fork 578
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
New false positive for MS_EXPOSE_REP since 4.3.0 #1747
Comments
A simple test case of a false positive is small:
SpotBugs starting with release 4.3.0 generates this warning:
The current detector, |
When upgrading from 4.2.2 to 4.7.2, we also faced the same problem, lots of getInstance method for a singleton classes are reported as MS_EXPOSE_REP. |
Thanks for the reminding. Will take a look at #1797 |
Since release 4.3.0 I get a false positive for MS_EXPOSE_REP. SpotBugs reports a variable that is created with
Collections.createImmutableSet()
as problematic.Affected Code:
https://github.com/jenkinsci/analysis-model/blob/master/src/main/java/edu/hm/hafner/analysis/Severity.java#L40
SpotBugs Warning: Public static edu.hm.hafner.analysis.Severity.getPredefinedValues() may expose internal representation by returning Severity.ALL_SEVERITIES
Details in our CI: https://ci.jenkins.io/job/Plugins/job/analysis-model/view/change-requests/job/PR-687/3/spotbugs/type.-1489577541/source.610ba3d7-4084-4194-a362-f73a2a8a575d/#142
The text was updated successfully, but these errors were encountered: