From 9025e8b4185cf965d51e64b1ed0aba7e43d33842 Mon Sep 17 00:00:00 2001 From: acolyer Date: Thu, 3 Nov 2005 17:09:45 +0000 Subject: tests for pr62606 - itdcs don't run field initialisers in target type. Largely updates to existing tests to cope with new Lint warning. --- tests/java5/annotations/aspectMembers/a/AnnotatedAspect03.aj | 2 +- tests/java5/annotations/binding/BindingWithAnnotatedItds3.aj | 6 +++--- .../annotations/binding/BindingWithDeclaredAnnotationItds4.aj | 6 +++--- tests/java5/annotations/itds/AnnotationsAndITDs.aj | 8 ++++---- 4 files changed, 11 insertions(+), 11 deletions(-) (limited to 'tests/java5/annotations') diff --git a/tests/java5/annotations/aspectMembers/a/AnnotatedAspect03.aj b/tests/java5/annotations/aspectMembers/a/AnnotatedAspect03.aj index 939285816..c3c6312a8 100644 --- a/tests/java5/annotations/aspectMembers/a/AnnotatedAspect03.aj +++ b/tests/java5/annotations/aspectMembers/a/AnnotatedAspect03.aj @@ -9,7 +9,7 @@ public aspect AnnotatedAspect03 { @MethodAnnotation private int ITDMe.getGoo() { return goo; } - @ConstructorAnnotation public ITDMe.new(int x) { goo = x; } + @ConstructorAnnotation public ITDMe.new(int x) { this(); goo = x; } } diff --git a/tests/java5/annotations/binding/BindingWithAnnotatedItds3.aj b/tests/java5/annotations/binding/BindingWithAnnotatedItds3.aj index 8bee421ec..caeec3ba7 100644 --- a/tests/java5/annotations/binding/BindingWithAnnotatedItds3.aj +++ b/tests/java5/annotations/binding/BindingWithAnnotatedItds3.aj @@ -5,11 +5,11 @@ import java.lang.annotation.*; public aspect BindingWithAnnotatedItds3 { - @Fruit("pear") A.new(String s) { } + @Fruit("pear") A.new(String s) { this(); } - private @Fruit("orange") A.new(int i) { } + private @Fruit("orange") A.new(int i) { this(); } - public @Fruit("tomato") A.new(boolean b) { } + public @Fruit("tomato") A.new(boolean b) { this(); } public static void main(String[]argv) { A instance1 = new A("a"); diff --git a/tests/java5/annotations/binding/BindingWithDeclaredAnnotationItds4.aj b/tests/java5/annotations/binding/BindingWithDeclaredAnnotationItds4.aj index 2ecc73c64..65b8d2802 100644 --- a/tests/java5/annotations/binding/BindingWithDeclaredAnnotationItds4.aj +++ b/tests/java5/annotations/binding/BindingWithDeclaredAnnotationItds4.aj @@ -5,11 +5,11 @@ import java.lang.annotation.*; public aspect BindingWithDeclaredAnnotationItds4 { - A.new(String s) { } + A.new(String s) { this(); } - private A.new(int i) { } + private A.new(int i) { this(); } - public A.new(boolean b) { } + public A.new(boolean b) { this(); } public static void main(String[]argv) { A instance1 = new A("a"); diff --git a/tests/java5/annotations/itds/AnnotationsAndITDs.aj b/tests/java5/annotations/itds/AnnotationsAndITDs.aj index 104681419..c26d8474a 100644 --- a/tests/java5/annotations/itds/AnnotationsAndITDs.aj +++ b/tests/java5/annotations/itds/AnnotationsAndITDs.aj @@ -14,10 +14,10 @@ public aspect AnnotationsAndITDs { // annotated ITD constructors @SomeAnnotation(s="hello",clazz=AnnotationsAndITDs.class) - public ITDMe.new(String s) {} + public ITDMe.new(String s) { this(); } @SomeAnnotation(s="goodbye",clazz=String.class) - private ITDMe.new(int x) {} + private ITDMe.new(int x) { this(); } // annotated ITD methods @@ -42,8 +42,8 @@ public aspect AnnotationsAndITDs { declare @constructor : ITDMe2.new(..) : @SomeAnnotation(s="@cons",clazz=String.class); - public ITDMe2.new(String s) {} - private ITDMe2.new(int x) {} + public ITDMe2.new(String s) { this(); } + private ITDMe2.new(int x) { this(); } // annotated ITD methods -- cgit v1.2.3