summaryrefslogtreecommitdiffstats
path: root/tests/features152/synchronization/transformed/Twelve.java
blob: f0016b5ef318a64d3b816ffb55b886caab33cf8e (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 unlock on transformed static method ( pre J5)

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

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