Skip to content

synchronized should be considered a dereference #1103

@agrieve

Description

@agrieve

(not very important bug figured it's worth an issue).

For the following code snippet:

        synchronized (sInstances) {
            manager = sInstances.get(registry);
            ...
        }

NullAway complains about the sInstances.get(), but it should complain about the synchronized (sInstances), since that's the first line that would throw a NPE if sInstances were null.

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