aboutsummaryrefslogtreecommitdiffstats
path: root/org.aspectj.ajdt.core/testsrc
diff options
context:
space:
mode:
authorAndy Clement <aclement@vmware.com>2012-03-02 09:19:25 -0800
committerAndy Clement <aclement@vmware.com>2012-03-02 09:19:25 -0800
commitd4a8cc90482cb538a88f74a9aae99a323e547c84 (patch)
tree3f0d3c0d1881fc9d1cb35482d048c161096bd5bd /org.aspectj.ajdt.core/testsrc
parentf37c56e02982a1043e7821bf033b58495f8a6b74 (diff)
downloadaspectj-d4a8cc90482cb538a88f74a9aae99a323e547c84.tar.gz
aspectj-d4a8cc90482cb538a88f74a9aae99a323e547c84.zip
generics
Diffstat (limited to 'org.aspectj.ajdt.core/testsrc')
-rw-r--r--org.aspectj.ajdt.core/testsrc/org/aspectj/tools/ajc/AjcTestCase.java22
-rw-r--r--org.aspectj.ajdt.core/testsrc/org/aspectj/tools/ajc/CompilationResult.java40
2 files changed, 32 insertions, 30 deletions
diff --git a/org.aspectj.ajdt.core/testsrc/org/aspectj/tools/ajc/AjcTestCase.java b/org.aspectj.ajdt.core/testsrc/org/aspectj/tools/ajc/AjcTestCase.java
index 7a9066a4a..d5ec93e66 100644
--- a/org.aspectj.ajdt.core/testsrc/org/aspectj/tools/ajc/AjcTestCase.java
+++ b/org.aspectj.ajdt.core/testsrc/org/aspectj/tools/ajc/AjcTestCase.java
@@ -430,11 +430,11 @@ public class AjcTestCase extends TestCase {
List missingWarnings = copyAll(expected.warnings);
List missingErrors = copyAll(expected.errors);
List missingWeaves = copyAll(expected.weaves);
- List extraFails = copyAll(result.getFailMessages());
- List extraInfos = copyAll(result.getInfoMessages());
- List extraWarnings = copyAll(result.getWarningMessages());
- List extraErrors = copyAll(result.getErrorMessages());
- List extraWeaves = copyAll(result.getWeaveMessages());
+ List<IMessage> extraFails = copyAll(result.getFailMessages());
+ List<IMessage> extraInfos = copyAll(result.getInfoMessages());
+ List<IMessage> extraWarnings = copyAll(result.getWarningMessages());
+ List<IMessage> extraErrors = copyAll(result.getErrorMessages());
+ List<IMessage> extraWeaves = copyAll(result.getWeaveMessages());
compare(expected.fails, result.getFailMessages(), missingFails, extraFails);
compare(expected.warnings, result.getWarningMessages(), missingWarnings, extraWarnings);
compare(expected.errors, result.getErrorMessages(), missingErrors, extraErrors);
@@ -477,8 +477,8 @@ public class AjcTestCase extends TestCase {
/**
* Helper method to build a new message list for passing to a MessageSpec.
*/
- protected List newMessageList(Message m1) {
- List ret = new ArrayList();
+ protected List<Message> newMessageList(Message m1) {
+ List<Message> ret = new ArrayList<Message>();
ret.add(m1);
return ret;
}
@@ -486,8 +486,8 @@ public class AjcTestCase extends TestCase {
/**
* Helper method to build a new message list for passing to a MessageSpec.
*/
- protected List newMessageList(Message m1, Message m2) {
- List ret = new ArrayList();
+ protected List<Message> newMessageList(Message m1, Message m2) {
+ List<Message> ret = new ArrayList<Message>();
ret.add(m1);
ret.add(m2);
return ret;
@@ -496,8 +496,8 @@ public class AjcTestCase extends TestCase {
/**
* Helper method to build a new message list for passing to a MessageSpec.
*/
- protected List newMessageList(Message m1, Message m2, Message m3) {
- List ret = new ArrayList();
+ protected List<Message> newMessageList(Message m1, Message m2, Message m3) {
+ List<Message> ret = new ArrayList<Message>();
ret.add(m1);
ret.add(m2);
ret.add(m3);
diff --git a/org.aspectj.ajdt.core/testsrc/org/aspectj/tools/ajc/CompilationResult.java b/org.aspectj.ajdt.core/testsrc/org/aspectj/tools/ajc/CompilationResult.java
index a6f589265..01e331523 100644
--- a/org.aspectj.ajdt.core/testsrc/org/aspectj/tools/ajc/CompilationResult.java
+++ b/org.aspectj.ajdt.core/testsrc/org/aspectj/tools/ajc/CompilationResult.java
@@ -15,6 +15,8 @@ import java.util.Collections;
import java.util.Iterator;
import java.util.List;
+import org.aspectj.bridge.IMessage;
+
/**
* Utility class that makes the results of a compiler run available.
* <p>
@@ -35,11 +37,11 @@ public class CompilationResult {
private String[] args;
private String stdOut;
private String stdErr;
- private List /*IMessage*/ infoMessages;
- private List /*IMessage*/ errorMessages;
- private List /*IMessage*/ warningMessages;
- private List /*IMessage*/ failMessages;
- private List /*IMessage*/ weaveMessages;
+ private List<IMessage> infoMessages;
+ private List<IMessage> errorMessages;
+ private List<IMessage> warningMessages;
+ private List<IMessage> failMessages;
+ private List<IMessage> weaveMessages;
/**
* Build a compilation result - called by the Ajc.compile and
@@ -50,19 +52,19 @@ public class CompilationResult {
String[] args,
String stdOut,
String stdErr,
- List infoMessages,
- List errorMessages,
- List warningMessages,
- List failMessages,
- List weaveMessages) {
+ List<IMessage> infoMessages,
+ List<IMessage> errorMessages,
+ List<IMessage> warningMessages,
+ List<IMessage> failMessages,
+ List<IMessage> weaveMessages) {
this.args = args;
this.stdOut = stdOut;
this.stdErr = stdErr;
- this.infoMessages = (infoMessages == null) ? Collections.EMPTY_LIST : infoMessages;
- this.errorMessages = (errorMessages == null) ? Collections.EMPTY_LIST : errorMessages;
- this.warningMessages = (warningMessages == null) ? Collections.EMPTY_LIST : warningMessages;
- this.failMessages = (failMessages == null) ? Collections.EMPTY_LIST : failMessages;
- this.weaveMessages = (weaveMessages == null) ? Collections.EMPTY_LIST : weaveMessages;
+ this.infoMessages = (infoMessages == null) ? Collections.<IMessage>emptyList() : infoMessages;
+ this.errorMessages = (errorMessages == null) ? Collections.<IMessage>emptyList() : errorMessages;
+ this.warningMessages = (warningMessages == null) ? Collections.<IMessage>emptyList() : warningMessages;
+ this.failMessages = (failMessages == null) ? Collections.<IMessage>emptyList() : failMessages;
+ this.weaveMessages = (weaveMessages == null) ? Collections.<IMessage>emptyList() : weaveMessages;
}
/**
@@ -122,7 +124,7 @@ public class CompilationResult {
* though.
* @see org.aspectj.tools.ajc.AjcTestCase
*/
- public List /*IMessage*/ getErrorMessages() { return errorMessages; }
+ public List<IMessage> getErrorMessages() { return errorMessages; }
/**
* The warning messages produced by the compiler. The list
* entries are the <code>IMessage</code> objects created during the
@@ -132,7 +134,7 @@ public class CompilationResult {
* though.
* @see org.aspectj.tools.ajc.AjcTestCase
*/
- public List /*IMessage*/ getWarningMessages() { return warningMessages; }
+ public List<IMessage> getWarningMessages() { return warningMessages; }
/**
* The fail or abort messages produced by the compiler. The list
* entries are the <code>IMessage</code> objects created during the
@@ -142,9 +144,9 @@ public class CompilationResult {
* though.
* @see org.aspectj.tools.ajc.AjcTestCase
*/
- public List /*IMessage*/ getFailMessages() { return failMessages; }
+ public List<IMessage> getFailMessages() { return failMessages; }
- public List /*IMessage*/ getWeaveMessages() { return weaveMessages; }
+ public List<IMessage> getWeaveMessages() { return weaveMessages; }
/**
* Returns string containing message count summary, list of messages