--- /dev/null
+package ajtest;
+
+public abstract aspect AbstractAspect extends BaseAspect {
+
+}
--- /dev/null
+package ajtest;
+
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+
+@Retention(RetentionPolicy.RUNTIME)
+public @interface AjTarget {
+
+}
--- /dev/null
+package ajtest;
+
+import java.lang.reflect.Field;
+
+import ajtest.AjTarget;
+
+public abstract aspect BaseAspect {
+
+ protected pointcut mapped(Object obj) : get(@(AjTarget) Long *) && target(obj);
+
+ Object around(Object obj) : mapped(obj) {
+ Object value = proceed(obj);
+ return value;
+ }
+}
--- /dev/null
+package ajtest;
+
+public aspect TestAspect extends AbstractAspect {
+
+}
--- /dev/null
+package ajtest;
+
+public class TestClass {
+ @AjTarget
+ private Long test;
+
+ public void testMethod() {
+ Object o = test;
+ System.out.println(o);
+ }
+}
*/
public class Ajc187Tests extends org.aspectj.testing.XMLBasedAjcTestCase {
+ public void testInfiniteLoop_475152() throws Exception {
+ runTest("infinite loop");
+ }
+
public void testAnnoConversion_474165() throws Exception {
runTest("anno conversion");
}
<suite>
+<ajc-test dir="bugs187/475152" title="infinite loop">
+<compile files="AbstractAspect.aj, BaseAspect.aj, TestClass.java, AjTarget.java, TestAspect.aj" options="-1.8"/>
+</ajc-test>
+
<ajc-test dir="bugs187/469889" title="broken java">
<!--
<compile files="A.java B.java AbstractA.java BImpl.java Main.java" options="-1.8"/>
containsInvokedynamic = 1;
LazyMethodGen lmg = boType.getLazyClassGen().getLazyMethodGen(this.signature.getName(), this.signature.getSignature(), true);
// Check Java8 supertypes
+ ResolvedType searchType = concreteAspect;
while (lmg == null) {
- ResolvedType superType = boType.getSuperclass();
- if (superType == null) break;
- ReferenceTypeDelegate rtd = ((ReferenceType)superType).getDelegate();
+ searchType = searchType.getSuperclass();
+ if (searchType == null) break;
+ ReferenceTypeDelegate rtd = ((ReferenceType)searchType).getDelegate();
if (rtd instanceof BcelObjectType) {
BcelObjectType bot = (BcelObjectType)rtd;
if (bot.javaClass.getMajor() < Constants.MAJOR_1_8) {