]> source.dussan.org Git - aspectj.git/commitdiff
testcode for 156962: Problems with @Deprecated in method signatures
authoraclement <aclement>
Tue, 12 Sep 2006 08:46:16 +0000 (08:46 +0000)
committeraclement <aclement>
Tue, 12 Sep 2006 08:46:16 +0000 (08:46 +0000)
tests/bugs153/pr156962/LiftDeprecation.aj [new file with mode: 0644]
tests/bugs153/pr156962/Sample.java [new file with mode: 0644]
tests/bugs153/pr156962/WarnDeprecatedMethod.aj [new file with mode: 0644]

diff --git a/tests/bugs153/pr156962/LiftDeprecation.aj b/tests/bugs153/pr156962/LiftDeprecation.aj
new file mode 100644 (file)
index 0000000..d982558
--- /dev/null
@@ -0,0 +1,3 @@
+public aspect LiftDeprecation {
+    declare @type: hasmethod(@Deprecated * *(..)): @Deprecated;
+}
diff --git a/tests/bugs153/pr156962/Sample.java b/tests/bugs153/pr156962/Sample.java
new file mode 100644 (file)
index 0000000..58545fa
--- /dev/null
@@ -0,0 +1,3 @@
+public class Sample {
+    @Deprecated public void sample() {}
+}
diff --git a/tests/bugs153/pr156962/WarnDeprecatedMethod.aj b/tests/bugs153/pr156962/WarnDeprecatedMethod.aj
new file mode 100644 (file)
index 0000000..54663d8
--- /dev/null
@@ -0,0 +1,4 @@
+public aspect WarnDeprecatedMethod {
+    public pointcut execDepr(): execution(@Deprecated * *(..));
+    declare warning: execDepr(): "deprecated method";  
+}