aboutsummaryrefslogtreecommitdiffstats
path: root/testing-client/src
diff options
context:
space:
mode:
Diffstat (limited to 'testing-client/src')
-rw-r--r--testing-client/src/org/aspectj/testing/Tester.java17
-rw-r--r--testing-client/src/org/aspectj/testing/server/TestServer.java6
2 files changed, 11 insertions, 12 deletions
diff --git a/testing-client/src/org/aspectj/testing/Tester.java b/testing-client/src/org/aspectj/testing/Tester.java
index afd37a492..500c4c363 100644
--- a/testing-client/src/org/aspectj/testing/Tester.java
+++ b/testing-client/src/org/aspectj/testing/Tester.java
@@ -51,10 +51,10 @@ public class Tester {
private static Set notes;
/** <code>List</code> to hold events submitted. */
- private static List actualEvents = new ArrayList();
+ private static List<String> actualEvents = new ArrayList<>();
/** <code>List</code> to hold events we expect. */
- private static List expectedEvents = new ArrayList();
+ private static List<String> expectedEvents = new ArrayList<>();
static {
setBASEDIR(new File("."));
@@ -103,8 +103,8 @@ public class Tester {
/** XXX deprecated #clear() */
public static void clearEvents() {
- actualEvents = new ArrayList();
- expectedEvents = new ArrayList();
+ actualEvents = new ArrayList<>();
+ expectedEvents = new ArrayList<>();
}
@@ -707,10 +707,10 @@ public class Tester {
}
/** @return String[] of differences '{un}expected msg "..." {not} found' */
- private static String[] diffIgnoreDups(Collection set, String[] expected, String msg,
+ private static String[] diffIgnoreDups(Collection<String> set, String[] expected, String msg,
boolean ignoreDups) {
- ArrayList result = new ArrayList();
- ArrayList actual = new ArrayList(set);
+ ArrayList<String> result = new ArrayList<>();
+ ArrayList<String> actual = new ArrayList<>(set);
BitSet hits = new BitSet();
for (int i = 0; i < expected.length; i++) {
if (!actual.remove(expected[i])) {
@@ -722,8 +722,7 @@ public class Tester {
}
}
}
- for (Iterator iter = actual.iterator(); iter.hasNext();) {
- String act = (String) iter.next();
+ for (String act: actual) {
result.add(" unexpected " + msg + " \"" + act + "\" found");
}
return (String[]) result.toArray(new String[0]);
diff --git a/testing-client/src/org/aspectj/testing/server/TestServer.java b/testing-client/src/org/aspectj/testing/server/TestServer.java
index b7b0d762b..12e8d097e 100644
--- a/testing-client/src/org/aspectj/testing/server/TestServer.java
+++ b/testing-client/src/org/aspectj/testing/server/TestServer.java
@@ -32,7 +32,7 @@ public class TestServer implements Runnable {
private boolean exitOnError = true;
private File workingDirectory;
private ClassLoader rootLoader;
- private Map loaders = new HashMap();
+ private Map<String,ClassLoader> loaders = new HashMap<>();
private String mainClass = "UnknownClass";
private String mainLoader = "UnknownLoader";
@@ -75,7 +75,7 @@ public class TestServer implements Runnable {
if (parent == null) error("No such loader: " + parentName);
}
- List urlList = new ArrayList();
+ List<URL> urlList = new ArrayList<>();
st = new StringTokenizer(classpath,";");
while (st.hasMoreTokens()) {
String fileName = st.nextToken();
@@ -93,7 +93,7 @@ public class TestServer implements Runnable {
}
private void createRootLoader () throws IOException {
- List urlList = new ArrayList();
+ List<URL> urlList = new ArrayList();
/* Sandbox */
URL url = workingDirectory.getCanonicalFile().toURL();