Skip to content

Mark classes / code as not threadsafe #3390

@hgschmie

Description

@hgschmie

Hi,

We use spotbugs in a largeish project and there are a number of false positives where spotbugs reports problems with thread (AT_NONATOMIC_64BIT_PRIMITIVE, AT_STALE_THREAD_WRITE_OF_PRIMITIVE, AT_NONATOMIC_OPERATIONS_ON_SHARED_VARIABLE).

The problem is that the places where this is reported have been explicitly documented as not threadsafe. So problems may exist but it does not matter because using this code from multiple threads is a problem in general.

Is there a way to mark such classes explicitly as not threadsafe so that spotbugs does not try to find multithreading bugs in code that is not intended to be used from multiple threads?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions