Преглед на файлове

fix for problem with transform of static synchronized method on pre Java5.

tags/pre_pr_153572
aclement преди 18 години
родител
ревизия
e38e839037
променени са 2 файла, в които са добавени 47 реда и са изтрити 0 реда
  1. 22
    0
      tests/features152/synchronization/transformed/Fifteen.java
  2. 25
    0
      tests/features152/synchronization/transformed/Sixteen.java

+ 22
- 0
tests/features152/synchronization/transformed/Fifteen.java Целия файл

@@ -0,0 +1,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");
}
}

+ 25
- 0
tests/features152/synchronization/transformed/Sixteen.java Целия файл

@@ -0,0 +1,25 @@
package a.b.c.d;

import java.io.File;
import java.io.FileInputStream;
import java.io.IOException;


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

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

before(): !within(Sixteen) && 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");
}
}

Loading…
Отказ
Запис