@@ -0,0 +1,23 @@ | |||
package hello; | |||
public aspect World { | |||
pointcut greeting(): | |||
execution(* Hello.sayHello(..)); | |||
after() returning: greeting() { | |||
System.out.println(" World!"); | |||
} | |||
String.new(Hello c) { | |||
this(h.sayHell()); | |||
} | |||
private static void main(String[] args) { | |||
String s = new String(new Hello()); | |||
Stystems.substring(0); | |||
} | |||
} | |||
class Hello { | |||
public void sayHell() {} | |||
} |
@@ -223,4 +223,11 @@ | |||
</run> | |||
</ajc-test> | |||
<ajc-test dir="bugs152/pr136393" title="NPE in makePreMethod"> | |||
<compile files="World.aj" options="-1.5"> | |||
<message kind="warning" line="10" text="this affected type is not exposed to the weaver: java.lang.String [Xlint:typeNotExposedToWeaver]"/> | |||
<message kind="error" line="11" text="h cannot be resolved"/> | |||
<message kind="error" line="16" text="Stystems cannot be resolved"/> | |||
</compile> | |||
</ajc-test> | |||
</suite> |