@@ -407,4 +407,9 @@ public class AjProblemReporter extends ProblemReporter { | |||
super.unusedPrivateType(typeDecl); | |||
} | |||
public void unusedPrivateMethod(AbstractMethodDeclaration methodDecl) { | |||
// don't output unused warnings for pointcuts... | |||
if (!(methodDecl instanceof PointcutDeclaration)) | |||
super.unusedPrivateMethod(methodDecl); | |||
} | |||
} |
@@ -0,0 +1,5 @@ | |||
public aspect pr101606 { | |||
private pointcut foo(); | |||
} |
@@ -378,6 +378,10 @@ public class Ajc150Tests extends org.aspectj.testing.XMLBasedAjcTestCase { | |||
runTest("synchronized itd interface methods"); | |||
} | |||
public void testNoWarningOnUnusedPointcut() { | |||
runTest("unused private pointcuts"); | |||
} | |||
// helper methods..... | |||
public SyntheticRepository createRepos(File cpentry) { |
@@ -468,7 +468,12 @@ | |||
</compile> | |||
<run class="SynchronizedInterfaceMethods"/> | |||
</ajc-test> | |||
<ajc-test dir="bugs150" pr="101606" title="unused private pointcuts"> | |||
<compile files="pr101606.aj" options="-warn:unusedPrivate"> | |||
</compile> | |||
</ajc-test> | |||
<!-- ============================================================================ --> | |||
<!-- ============================================================================ --> | |||