aboutsummaryrefslogtreecommitdiffstats
path: root/tests/bugs150
diff options
context:
space:
mode:
authoracolyer <acolyer>2005-11-03 17:09:45 +0000
committeracolyer <acolyer>2005-11-03 17:09:45 +0000
commit9025e8b4185cf965d51e64b1ed0aba7e43d33842 (patch)
treeee5d7d16f1ea95c5bcf8dea3f7eff00626335aaa /tests/bugs150
parent38084566dbf9d17cbe375f7fdfa14a821e3d7311 (diff)
downloadaspectj-9025e8b4185cf965d51e64b1ed0aba7e43d33842.tar.gz
aspectj-9025e8b4185cf965d51e64b1ed0aba7e43d33842.zip
tests for pr62606 - itdcs don't run field initialisers in target type. Largely updates to existing tests to cope with new Lint warning.
Diffstat (limited to 'tests/bugs150')
-rw-r--r--tests/bugs150/PR82570_1.java2
-rw-r--r--tests/bugs150/Pr62606.aj35
-rw-r--r--tests/bugs150/pr111481.aj1
-rw-r--r--tests/bugs150/pr113073.java1
-rw-r--r--tests/bugs150/pr59397.aj2
5 files changed, 39 insertions, 2 deletions
diff --git a/tests/bugs150/PR82570_1.java b/tests/bugs150/PR82570_1.java
index 074ad22d1..c7eb464d6 100644
--- a/tests/bugs150/PR82570_1.java
+++ b/tests/bugs150/PR82570_1.java
@@ -12,7 +12,7 @@ public class PR82570_1 {
aspect X {
- public PR82570_1.new(String p) {}
+ public PR82570_1.new(String p) { this(); }
public int PR82570_1.itdField;
diff --git a/tests/bugs150/Pr62606.aj b/tests/bugs150/Pr62606.aj
new file mode 100644
index 000000000..0cf661647
--- /dev/null
+++ b/tests/bugs150/Pr62606.aj
@@ -0,0 +1,35 @@
+import org.aspectj.lang.annotation.*;
+
+public aspect Pr62606 {
+
+ // xlint
+ public Target.new() {}
+
+ // no xlint
+ public Target.new(String s) {
+ this(1);
+ }
+
+ // no xlint
+ @SuppressAjWarnings
+ public Target.new(double d) {}
+
+ // no xlint
+ @SuppressAjWarnings({"noExplicitConstructorCall"})
+ public Target.new(float f) {}
+
+ // no xlint
+ @SuppressAjWarnings({"adviceDidNotMatch","noExplicitConstructorCall"})
+ public Target.new(short s) {}
+}
+
+class Target {
+
+ int x = 5;
+ int y;
+
+ public Target(int z) {
+ this.y = z;
+ }
+
+} \ No newline at end of file
diff --git a/tests/bugs150/pr111481.aj b/tests/bugs150/pr111481.aj
index e764b4e4f..6c3020b70 100644
--- a/tests/bugs150/pr111481.aj
+++ b/tests/bugs150/pr111481.aj
@@ -8,6 +8,7 @@ public class pr111481 {
}
aspect A {
public pr111481.new(Object... names) {
+ this();
System.out.println(names[0]);
}
diff --git a/tests/bugs150/pr113073.java b/tests/bugs150/pr113073.java
index 9e57ffaa9..6ebff397d 100644
--- a/tests/bugs150/pr113073.java
+++ b/tests/bugs150/pr113073.java
@@ -9,6 +9,7 @@ class C {
aspect D {
public C.new(String s) {
+ this();
}
public void C.anotherMethod(String s) {
}
diff --git a/tests/bugs150/pr59397.aj b/tests/bugs150/pr59397.aj
index a8c157c9e..b11d6f475 100644
--- a/tests/bugs150/pr59397.aj
+++ b/tests/bugs150/pr59397.aj
@@ -1,5 +1,5 @@
aspect A {
- HW.new(String s) {}
+ HW.new(String s) {this();}
declare warning : initialization(HW.new(String,A)) : "should not match";
declare warning : initialization(HW.new(String)) : "should match";
}