mirror of
https://github.com/eclipse-aspectj/aspectj.git
synced 2024-09-13 15:45:38 +02:00
ef7885fd12
NPE, Incorrect XLint:unmatchedSuperTypeInCall warning
30 lines
731 B
Java
30 lines
731 B
Java
interface ILib { void run(); }
|
|
|
|
class UnmatchedCallSupertype implements ILib {
|
|
public static void main(String[] args) {
|
|
new UnmatchedCallSupertype().run();
|
|
}
|
|
public void run() {
|
|
System.err.println(this.toString());
|
|
System.err.println(this.toString());
|
|
System.err.println(this.toString());
|
|
System.err.println(this.toString());
|
|
}
|
|
}
|
|
|
|
aspect X {
|
|
|
|
pointcut runCall() : call(* ILib.*(..));
|
|
pointcut monitor() : call(String clone(String)) || runCall();
|
|
|
|
before() : monitor() {
|
|
System.err.println(thisJoinPointStaticPart.getSignature().getDeclaringType().getName());
|
|
}
|
|
}
|
|
|
|
class Client {
|
|
public static void main(String[] args) { new Lib().run(); }
|
|
static class Lib implements ILib { public void run() {} }
|
|
}
|
|
|