aboutsummaryrefslogtreecommitdiffstats
path: root/tests/features152/synchronization/transformed/Fifteen.java
blob: 51d6dc4f40d2c9ba3b973096b6c42c70ad70aa35 (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 Fifteen {
  public static void main(String[] args) {
    Blah.b();
  }

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