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
False positive for SSD_DO_NOT_USE_INSTANCE_LOCK_ON_SHARED_STATIC_DATA
and other problems with the report
#2089
Comments
There is 1 more false positive, but I'm not sure what detector settings I need. The default ones don't report it. The settings in the product I work on do.
|
It should be a problem with the settings. If you check the test From what I see now, the category of the bugtype should be I will fix the messages, thanks for the remarks. 👍 |
Which settings would that be? Compiler (JDT) or SpotBugs settings? The test you mentioned has this in its contents:
This is not the same as the snippet in the description, since the method is not The test also fails if the test snippet is adjusted to be similar to the snippet from the description.
Whereas the test doesn't fail without changes. I don't think this is a settings problem. |
I see, although the |
@trancexpress PR is opened, you can check the fix there. |
I tested with the fix, it works. Thanks! |
Reproduction with snippet:
SpotBugs
4.7 reports 2 problems:There are 3 problems (that I see) with this (sorted from most important to least important):
static final
lock in a synchronized block, around thestatic
field access. The use of which is also advised in the description of the bug.The text was updated successfully, but these errors were encountered: