diff options
Diffstat (limited to 'tests/bugs195/550494/DataSourceConnectionAspectAnno.java')
-rw-r--r-- | tests/bugs195/550494/DataSourceConnectionAspectAnno.java | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/tests/bugs195/550494/DataSourceConnectionAspectAnno.java b/tests/bugs195/550494/DataSourceConnectionAspectAnno.java new file mode 100644 index 000000000..d78b48192 --- /dev/null +++ b/tests/bugs195/550494/DataSourceConnectionAspectAnno.java @@ -0,0 +1,20 @@ +package foo; + +import javax.sql.DataSource; + +import org.aspectj.lang.JoinPoint; +import org.aspectj.lang.annotation.Aspect; +import org.aspectj.lang.annotation.Before; +import org.aspectj.lang.annotation.DeclareParents; + +@Aspect +public class DataSourceConnectionAspectAnno { + // This statement crashes the AspectJ compiler + @DeclareParents("foo.BaseClass") + private DataSource dataSource; + + @Before("execution(public java.sql.Connection javax.sql.DataSource+.getConnection(..))") + public void myAdvice(JoinPoint thisJoinPoint) { + System.out.println(thisJoinPoint); + } +} |