summaryrefslogtreecommitdiff
path: root/plugins/InspectionGadgets/test/com/siyeh/igtest/threading/NakedNotifyInspection.java
blob: d23eb118701f505f31e2ad30e1371e7f46dc4665 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
package com.siyeh.igtest.threading;

public class NakedNotifyInspection
{
    public void foo()
    {
        final Object bar = new Object();
        synchronized (this) {
            bar.toString();
            bar.notify();
        }
        synchronized (this) {
            notifyAll();
        }
        synchronized (this) {
            notify();
        }
    }

    public synchronized void bar()
    {
        notifyAll();
    }
}