aboutsummaryrefslogtreecommitdiffstats
path: root/tests/features152/synchronization/transformed/Eleven.java
blob: e9a3fa85aab982ec0c49f3b7efb26fbe76c31f13 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
import java.io.File;
import java.io.FileInputStream;
import java.io.IOException;

// matching lock on transformed static method ( pre J5)

public aspect Eleven {
  public static void main(String[] args) {
    C.b();
  }

  before(): !within(Eleven) && lock() { 
    System.err.println("Locking occurring at "+thisJoinPoint);
    System.err.println(thisJoinPoint.getSourceLocation().getFileName());
  }
}
  
class C {
  public static synchronized void b() {
    System.err.println("hello");
  }
}