Skip to content

New Analyzer: Synchronization in the constructor #92

@camrein

Description

@camrein

Synchronization in the constructor is usually unnecessary since the constructor completes before any other operation on the object's members can be made (given that there are no data races in the invoking code). It may be necessary if the constructor creates a thread. However, this should be refactored to a factory method as PH_S007 suggests.

TBD: Check if static fields are accessed.

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