@@ -646,10 +646,8 @@ public class AjPipeliningCompilerAdapter extends AbstractCompilerAdapter { | |||
return true; // code style | |||
} else if (declaration.annotations != null) { // check for annotation style | |||
for (int index = 0; index < declaration.annotations.length; index++) { | |||
TypeDeclaration | |||
.resolveAnnotations(declaration.staticInitializerScope, declaration.annotations, declaration.binding); // force | |||
// annotation | |||
// resolution | |||
// Cause annotation resolution | |||
declaration.binding.getAnnotationTagBits(); | |||
Annotation a = declaration.annotations[index]; | |||
if (a.resolvedType == null) { | |||
continue; // another problem is being reported, so don't crash here |
@@ -0,0 +1,10 @@ | |||
@ContextConfiguration | |||
public class Test2 { | |||
static class ContextConfiguration { | |||
} | |||
} | |||
@interface ContextConfiguration { | |||
} |
@@ -21,6 +21,10 @@ import org.aspectj.testing.XMLBasedAjcTestCase; | |||
*/ | |||
public class Ajc188Tests extends org.aspectj.testing.XMLBasedAjcTestCase { | |||
public void testAnnotationDiscoveryNpe() throws Exception { | |||
runTest("annotation discovery npe"); | |||
} | |||
public void testDefaultMethodsWithXnoInline() throws Exception { | |||
runTest("default methods 1"); | |||
} |
@@ -2,6 +2,10 @@ | |||
<suite> | |||
<ajc-test dir="bugs188/484941" title="annotation discovery npe"> | |||
<compile files="Test2.java" options="-1.8 -XnoInline"/> | |||
</ajc-test> | |||
<ajc-test dir="bugs188/defaultmethods" title="default methods 1"> | |||
<compile files="Code.java" options="-1.8 -XnoInline"/> | |||
<run class="Code"> |