From c78628924a9969b5e84ac13cbaf63efa13422d0e Mon Sep 17 00:00:00 2001 From: aclement Date: Fri, 18 Jul 2008 21:56:31 +0000 Subject: 230234 comment 10 - ajdoc modifications and tests --- tests/bugs153/GenericMethod/C.java | 14 ++++++++++++++ tests/bugs153/StaticImport/C.java | 8 ++++++++ tests/bugs153/StaticImport/StaticImport.java | 5 +++++ tests/bugs153/pr148908/BadInterface.java | 13 +++++++++++++ 4 files changed, 40 insertions(+) create mode 100644 tests/bugs153/GenericMethod/C.java create mode 100644 tests/bugs153/StaticImport/C.java create mode 100644 tests/bugs153/StaticImport/StaticImport.java (limited to 'tests/bugs153') diff --git a/tests/bugs153/GenericMethod/C.java b/tests/bugs153/GenericMethod/C.java new file mode 100644 index 000000000..8621aca45 --- /dev/null +++ b/tests/bugs153/GenericMethod/C.java @@ -0,0 +1,14 @@ +import java.util.List; + +public class C { + public T returnT(T a){ + return a; + } + + public Q returnQ(Q a){ + return a; + } + + public void doubleGeneric(Q a, T b){ + } +} diff --git a/tests/bugs153/StaticImport/C.java b/tests/bugs153/StaticImport/C.java new file mode 100644 index 000000000..fd86d0162 --- /dev/null +++ b/tests/bugs153/StaticImport/C.java @@ -0,0 +1,8 @@ +package ABC; + +import static ABC.StaticImport.Alphabet.A; +import ABC.StaticImport.*; + +public class C { + protected Alphabet alphabet = A; +} diff --git a/tests/bugs153/StaticImport/StaticImport.java b/tests/bugs153/StaticImport/StaticImport.java new file mode 100644 index 000000000..7148b8471 --- /dev/null +++ b/tests/bugs153/StaticImport/StaticImport.java @@ -0,0 +1,5 @@ +package ABC; + +public class StaticImport { + public enum Alphabet {A, B, C, D;} +} diff --git a/tests/bugs153/pr148908/BadInterface.java b/tests/bugs153/pr148908/BadInterface.java index 700f652be..ea95de3f3 100644 --- a/tests/bugs153/pr148908/BadInterface.java +++ b/tests/bugs153/pr148908/BadInterface.java @@ -1,4 +1,6 @@ import java.util.Comparator; +import java.util.LinkedList; +import java.util.List; public interface BadInterface { @@ -8,4 +10,15 @@ public interface BadInterface { return 0; } }; + + public List aList = new LinkedList() {{ add("Busted"); }}; + + public List bList = new LinkedList() { + public int size() { + for(int i = 0; i < 100; i++) { + return 0; + } + return modCount; + } + }; } -- cgit v1.2.3