Skip to content

Sync when locked object is indirect via method call #8

@andrecostea

Description

@andrecostea

src/test/java/alarmclock/AlarmClock.java:191: warning: Thread Safety Violation 2
Read/Write race. Non-private method Monitor.wakeme(...) indirectly reads without synchronization from this.waitList.list.[_]. Potentially races with write in method Monitor.tick().
Reporting because this access may occur on a background thread.
189. */
190. try {
191. > synchronized (waitList.getLock(waketime)) {
192. try {
193. waitList.getLock(waketime).wait();

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