--- /dev/null
+public aspect Asp {
+}
--- /dev/null
+public class Client {
+ public static void main(String argz[]) {
+ if (!Asp.hasAspect())
+ throw new RuntimeException("ou est le aspect?");
+ System.out.println("Can call aspectOf? "+Asp.aspectOf());
+ }
+}
for (Method m : ms) {
if (!m.isSynthetic()) {
String name = m.getName();
+ if (name.equals("aspectOf") || name.equals("hasAspect")) continue;
if ( ! (name.startsWith("ajc$before") || name.startsWith("ajc$after") || name.startsWith("ajc$around") ||
name.startsWith("ajc$interMethod$"))) {
System.err.println("Found non-synthetic method: " + m.getName() + " in " + c.getName());
// public void testItdCallingGenericMethod_pr145391_2() { runTest("itd calling generic method - 2");}
// public void testAdviceNotWovenAspectPath_pr147841() { runTest("advice not woven on aspectpath");}
// public void testClassCastForInvalidAnnotationValue_pr148537() { runTest("classcast annotation value");}
+ public void testSeparateCallAspectOf_pr148727() { runTest("separate compilation calling aspectOf and hasAspect"); }
+ public void testIntegratedCallAspectOf_pr148727() { runTest("integrated compilation calling aspectOf and hasAspect"); }
public void testFreakyNewArrayJoinpoint_pr148786() { runTest("freaky new array joinpoint"); }
public void testPrivilegeGeneric_pr148545() { runTest("nosuchmethoderror for privileged aspect");}
public void testPrivilegeGeneric_pr148545_2() { runTest("nosuchmethoderror for privileged aspect - 2");}
public void testAspectLibrariesAndASM_pr135001() { runTest("aspect libraries and asm");}
public void testStackOverflow_pr136258() { runTest("stack overflow");}
public void testIncorrectOverridesEvaluation13() { runTest("incorrect overrides evaluation - 1.3"); }
+// public void testIncorrectOverridesEvaluation14() { runTest("incorrect overrides evaluation - 1.4"); }
public void testIncorrectOverridesEvaluation15() { runTest("incorrect overrides evaluation - 1.5"); }
public void testAtWithinCodeBug_pr138798() { runTest("atWithinCodeBug"); }
public void testReferencePCutInDeclareWarning_pr138215() { runTest("Reference pointcut fails inside @DeclareWarning");}
</compile>
</ajc-test>
+ <ajc-test dir="bugs152/binaryDecp" title="incorrect overrides evaluation - 1.4">
+ <compile files="IsItSynthetic.java" options="-1.5"/>
+ <compile files="Top.java" options="-source 1.5 -target 1.5" outjar="a.jar"/>
+ <compile files="Bottom.java" classpath="$sandbox/a.jar" options="-source 1.4 -target 1.4" outjar="b.jar"/>
+ <compile files="Middle.java" classpath="$sandbox/a.jar" options="-source 1.4 -target 1.4" outjar="c.jar"/>
+ <compile files="X2.aj" classpath="$sandbox/a.jar;$sandbox/b.jar;$sandbox/c.jar" options="-Xlint:ignore" outjar="x.jar"/>
+ <run class="Bottom" classpath="a.jar;b.jar;c.jar;x.jar" ltw="aop.xml"/>
+ <!--message kind="weave" text="Setting superclass of type 'Bottom' (Bottom.java) to 'Middle' (X2.aj)"/-->
+ </ajc-test>
+
<ajc-test dir="bugs152/binaryDecp" title="incorrect overrides evaluation - 1.5">
<compile files="SubClassLoader.java,SubSubClassLoader.java" options="-1.5" outjar="lib.jar"/>
<compile files="X.aj" inpath="lib.jar" options="-showWeaveInfo">
</stderr>
</run>
</ajc-test>
+
+ <ajc-test dir="bugs152/pr148727" pr="148727"
+ title="integrated compilation calling aspectOf and hasAspect" >
+ <compile files="Asp.aj, Client.java" options="-source 1.4"/>
+ <run class="Client">
+ <stdout>
+ <line text="Can call aspectOf? Asp@"/>
+ </stdout>
+ </run>
+ </ajc-test>
+
+ <ajc-test dir="bugs152/pr148727" pr="148727"
+ title="separate compilation calling aspectOf and hasAspect" >
+ <compile files="Asp.aj" outjar="asp.jar"/>
+ <compile files="Client.java" classpath="asp.jar" options="-source 1.4"/>
+ <run class="Client">
+ <stdout>
+ <line text="Can call aspectOf? Asp@"/>
+ </stdout>
+ </run>
+ </ajc-test>
</suite>
\ No newline at end of file
else if (methodName.indexOf("_aroundBody") != -1) {
return true;
}
- else if (declaredInAspect) {
- if (methodName.equals("aspectOf") || methodName.equals("hasAspect")) {
- return true;
- }
- }
+// these aren't the droids you're looking for...move along...... pr148727
+// else if (declaredInAspect) {
+// if (methodName.equals("aspectOf") || methodName.equals("hasAspect")) {
+// return true;
+// }
+// }
return false;
}