<message kind="warning" line="11" text="In String ctor"/>
</compile>
</ajc-test>
+
+ <ajc-test dir="bugs" pr="60015"
+ title="NPE, Incorrect XLint:unmatchedSuperTypeInCall warning">
+ <compile files="IncorrectXlintOnInterface.java">
+ </compile>
+ </ajc-test>
</suite>
--- /dev/null
+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() {} }
+}
+
exactDeclaringType.resolve(world))) {
return;
}
+
+ // PR60015 - Don't report the warning if the declaring type is object and 'this' is an interface
+ if (exactDeclaringType.isInterface(world) && shadowDeclaringType.equals(world.resolve("java.lang.Object"))) {
+ return;
+ }
SignaturePattern nonConfusingPattern =
new SignaturePattern(