Browse Source

generics

tags/V1_7_0RC1
Andy Clement 12 years ago
parent
commit
d4a8cc9048

+ 22
- 22
loadtime/testsrc/org/aspectj/weaver/loadtime/WeavingURLClassLoaderTest.java View File

@@ -59,7 +59,7 @@ public class WeavingURLClassLoaderTest extends TestCase {
WeavingURLClassLoader loader = new WeavingURLClassLoader(getClass().getClassLoader());

try {
Class clazz = loader.loadClass("LTWHelloWorld");
Class<?> clazz = loader.loadClass("LTWHelloWorld");
invokeMain(clazz, new String[] {});
} catch (Exception ex) {
fail(ex.toString());
@@ -76,7 +76,7 @@ public class WeavingURLClassLoaderTest extends TestCase {
WeavingURLClassLoader loader = new WeavingURLClassLoader(getClass().getClassLoader());

try {
Class clazz = loader.loadClass("LTWHelloWorld");
Class<?> clazz = loader.loadClass("LTWHelloWorld");
invokeMain(clazz, new String[] { "LTWAspect" });
} catch (Exception ex) {
fail(ex.toString());
@@ -122,7 +122,7 @@ public class WeavingURLClassLoaderTest extends TestCase {
WeavingURLClassLoader loader = new WeavingURLClassLoader(classURLs, aspectURLs, getClass().getClassLoader());

try {
Class clazz = loader.loadClass("LTWHelloWorld");
Class<?> clazz = loader.loadClass("LTWHelloWorld");
invokeMain(clazz, new String[] { "LTWAspect" });
} catch (Exception ex) {
fail(ex.toString());
@@ -136,7 +136,7 @@ public class WeavingURLClassLoaderTest extends TestCase {
WeavingURLClassLoader loader = new WeavingURLClassLoader(getClass().getClassLoader());

try {
Class clazz = loader.loadClass("LTWHelloWorld");
Class<?> clazz = loader.loadClass("LTWHelloWorld");
invokeMain(clazz, new String[] { "LTWAspect" });
} catch (Exception ex) {
fail(ex.toString());
@@ -151,7 +151,7 @@ public class WeavingURLClassLoaderTest extends TestCase {
WeavingURLClassLoader loader = new WeavingURLClassLoader(getClass().getClassLoader());

try {
Class clazz = loader.loadClass("LTWHelloWorld");
Class<?> clazz = loader.loadClass("LTWHelloWorld");
invokeMain(clazz, new String[] { "LTWAspect" });
} catch (Exception ex) {
fail(ex.toString());
@@ -166,7 +166,7 @@ public class WeavingURLClassLoaderTest extends TestCase {
WeavingURLClassLoader loader = new WeavingURLClassLoader(getClass().getClassLoader());

try {
Class clazz = loader.loadClass("LTWHelloWorld");
Class<?> clazz = loader.loadClass("LTWHelloWorld");
invokeMain(clazz, new String[] { "LTWAspect" });
} catch (Exception ex) {
fail(ex.toString());
@@ -179,7 +179,7 @@ public class WeavingURLClassLoaderTest extends TestCase {
WeavingURLClassLoader loader = new WeavingURLClassLoader(getClass().getClassLoader());

try {
Class clazz = loader.loadClass("LTWHelloWorld");
Class<?> clazz = loader.loadClass("LTWHelloWorld");
invokeMain(clazz, new String[] {});
} catch (Exception ex) {
fail(ex.toString());
@@ -192,7 +192,7 @@ public class WeavingURLClassLoaderTest extends TestCase {
WeavingURLClassLoader loader = new WeavingURLClassLoader(getClass().getClassLoader());

try {
Class clazz = loader.loadClass("LTWHelloWorld");
Class<?> clazz = loader.loadClass("LTWHelloWorld");
invokeMain(clazz, new String[] {});
fail("Expecting org.aspectj.bridge.AbortException");
} catch (Exception ex) {
@@ -207,7 +207,7 @@ public class WeavingURLClassLoaderTest extends TestCase {
WeavingURLClassLoader loader = new WeavingURLClassLoader(getClass().getClassLoader());

try {
Class clazz = loader.loadClass("LTWHelloWorld");
Class<?> clazz = loader.loadClass("LTWHelloWorld");
invokeMain(clazz, new String[] { "LTWAroundClosure" });
} catch (Exception ex) {
fail(ex.toString());
@@ -223,7 +223,7 @@ public class WeavingURLClassLoaderTest extends TestCase {
WeavingURLClassLoader loader = new WeavingURLClassLoader(classURLs, aspectURLs, getClass().getClassLoader());

try {
Class clazz = loader.loadClass("LTWHelloWorld");
Class<?> clazz = loader.loadClass("LTWHelloWorld");
invokeMain(clazz, new String[] { "LTWInterfaceITD", "LTWFieldITD", "LTWMethodITD" });
} catch (Exception ex) {
ex.printStackTrace();
@@ -243,7 +243,7 @@ public class WeavingURLClassLoaderTest extends TestCase {
WeavingURLClassLoader loader = new WeavingURLClassLoader(classURLs, aspectURLs, getClass().getClassLoader());

try {
Class clazz = loader.loadClass("LTWHelloWorld");
Class<?> clazz = loader.loadClass("LTWHelloWorld");
invokeMain(clazz, new String[] { "LTWPerthis" });
} catch (Exception ex) {
fail(ex.toString());
@@ -262,7 +262,7 @@ public class WeavingURLClassLoaderTest extends TestCase {
WeavingURLClassLoader loader = new WeavingURLClassLoader(classURLs, aspectURLs, getClass().getClassLoader());

try {
Class clazz = loader.loadClass("LTWHelloWorld");
Class<?> clazz = loader.loadClass("LTWHelloWorld");
invokeMain(clazz, new String[] { "LTWAspect", "LTWAroundClosure", "LTWPerthis", "LTWInterfaceITD", "LTWFieldITD",
"LTWMethodITD", "LTWPerthis" });
} catch (Exception ex) {
@@ -315,7 +315,7 @@ public class WeavingURLClassLoaderTest extends TestCase {
loader.addURL(classes);

try {
Class clazz = loader.loadClass("LTWHelloWorld");
Class<?> clazz = loader.loadClass("LTWHelloWorld");
invokeMain(clazz, new String[] { "LTWAspect" });
} catch (Exception ex) {
fail(ex.toString());
@@ -336,7 +336,7 @@ public class WeavingURLClassLoaderTest extends TestCase {
WeavingURLClassLoader child = new WeavingURLClassLoader(classURLs, aspectURLs, parent);

try {
Class clazz = child.loadClass("LTWHelloWorld");
Class<?> clazz = child.loadClass("LTWHelloWorld");
invokeMain(clazz, new String[] { "LTWAspect" });
} catch (Exception ex) {
fail(ex.toString());
@@ -352,7 +352,7 @@ public class WeavingURLClassLoaderTest extends TestCase {
WeavingURLClassLoader loader = new WeavingURLClassLoader(getClass().getClassLoader());

try {
Class clazz = loader.loadClass("LTWHelloWorld");
Class<?> clazz = loader.loadClass("LTWHelloWorld");
invokeMain(clazz, new String[] { "LTWAspect" });
fail("Expecting java.lang.NoClassDefFoundError");
} catch (Exception ex) {
@@ -372,7 +372,7 @@ public class WeavingURLClassLoaderTest extends TestCase {
WeavingURLClassLoader loader = new WeavingURLClassLoader(getClass().getClassLoader());

try {
Class clazz = loader.loadClass("ltw.LTWPackageTest");
Class<?> clazz = loader.loadClass("ltw.LTWPackageTest");
invokeMain(clazz, new String[] {});
Package pakkage = clazz.getPackage();
assertTrue("Expected 'ltw' got " + pakkage, (pakkage != null));
@@ -442,7 +442,7 @@ public class WeavingURLClassLoaderTest extends TestCase {
URL[] aspectURLs = new URL[] { aspects };
WeavingURLClassLoader loader = new WeavingURLClassLoader(classURLs, aspectURLs, getClass().getClassLoader());

Class clazz = loader.loadClass("packag.Main");
Class<?> clazz = loader.loadClass("packag.Main");
invokeMain(clazz, new String[] {});
}

@@ -455,7 +455,7 @@ public class WeavingURLClassLoaderTest extends TestCase {
URL[] aspectURLs = new URL[] { aspects };
WeavingURLClassLoader loader = new WeavingURLClassLoader(classURLs, aspectURLs, getClass().getClassLoader());

Class clazz = loader.loadClass("packag.Main");
Class<?> clazz = loader.loadClass("packag.Main");
invokeMain(clazz, new String[] {});
fail("Should reject bad aspect MissingFile");
} catch (AbortException ae) {
@@ -473,7 +473,7 @@ public class WeavingURLClassLoaderTest extends TestCase {
URL[] aspectURLs = new URL[] { aspects };
ClassLoader parent = getClass().getClassLoader();
WeavingURLClassLoader loader = new WeavingURLClassLoader(classURLs, aspectURLs, parent);
Class clazz = loader.loadClass("packag.Main");
Class<?> clazz = loader.loadClass("packag.Main");
invokeMain(clazz, new String[] {});
// throws Error unless advice applies
}
@@ -484,7 +484,7 @@ public class WeavingURLClassLoaderTest extends TestCase {
URL[] classURLs = new URL[] { classes, aspectjrt };
ClassLoader parent = getClass().getClassLoader();
WeavingURLClassLoader loader = new WeavingURLClassLoader(classURLs, new URL[] {}, parent);
Class clazz = loader.loadClass("packag.Main");
Class<?> clazz = loader.loadClass("packag.Main");
invokeMain(clazz, new String[] {});
// throws Error because advice does not apply
}
@@ -494,7 +494,7 @@ public class WeavingURLClassLoaderTest extends TestCase {
}

public static void invokeMain(Class clazz, String[] args) {
Class[] paramTypes = new Class[1];
Class<?>[] paramTypes = new Class[1];
paramTypes[0] = args.getClass();

try {
@@ -535,7 +535,7 @@ public class WeavingURLClassLoaderTest extends TestCase {

/* Restore system properties */
Properties systemProperties = System.getProperties();
for (Enumeration enu = savedProperties.keys(); enu.hasMoreElements();) {
for (Enumeration<Object> enu = savedProperties.keys(); enu.hasMoreElements();) {
String key = (String) enu.nextElement();
String value = savedProperties.getProperty(key);
if (value == NULL) {

+ 1
- 1
org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/compiler/WeaverMessageHandler.java View File

@@ -209,7 +209,7 @@ public class WeaverMessageHandler implements IMessageHandler {

private IProblem[] buildSeeAlsoProblems(IProblem originalProblem, List sourceLocations, CompilationResult problemSource,
boolean usedBinarySourceFileName) {
List ret = new ArrayList();
List<IProblem> ret = new ArrayList<IProblem>();

for (int i = 0; i < sourceLocations.size(); i++) {
ISourceLocation loc = (ISourceLocation) sourceLocations.get(i);

+ 11
- 11
org.aspectj.ajdt.core/testsrc/org/aspectj/tools/ajc/AjcTestCase.java View File

@@ -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);

+ 21
- 19
org.aspectj.ajdt.core/testsrc/org/aspectj/tools/ajc/CompilationResult.java View File

@@ -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

+ 6
- 6
org.aspectj.matcher/src/org/aspectj/weaver/patterns/WildTypePattern.java View File

@@ -109,23 +109,23 @@ public class WildTypePattern extends TypePattern {
setLocation(namePatterns[0].getSourceContext(), namePatterns[0].getStart(), namePatterns[namePatterns.length - 1].getEnd());
}

public WildTypePattern(List names, boolean includeSubtypes, int dim) {
public WildTypePattern(List<NamePattern> names, boolean includeSubtypes, int dim) {
this((NamePattern[]) names.toArray(new NamePattern[names.size()]), includeSubtypes, dim, false, TypePatternList.EMPTY);

}

public WildTypePattern(List names, boolean includeSubtypes, int dim, int endPos) {
public WildTypePattern(List<NamePattern> names, boolean includeSubtypes, int dim, int endPos) {
this(names, includeSubtypes, dim);
this.end = endPos;
}

public WildTypePattern(List names, boolean includeSubtypes, int dim, int endPos, boolean isVarArg) {
public WildTypePattern(List<NamePattern> names, boolean includeSubtypes, int dim, int endPos, boolean isVarArg) {
this(names, includeSubtypes, dim);
this.end = endPos;
this.isVarArgs = isVarArg;
}

public WildTypePattern(List names, boolean includeSubtypes, int dim, int endPos, boolean isVarArg, TypePatternList typeParams,
public WildTypePattern(List<NamePattern> names, boolean includeSubtypes, int dim, int endPos, boolean isVarArg, TypePatternList typeParams,
TypePattern upperBound, TypePattern[] additionalInterfaceBounds, TypePattern lowerBound) {
this((NamePattern[]) names.toArray(new NamePattern[names.size()]), includeSubtypes, dim, isVarArg, typeParams);
this.end = endPos;
@@ -134,7 +134,7 @@ public class WildTypePattern extends TypePattern {
this.additionalInterfaceBounds = additionalInterfaceBounds;
}

public WildTypePattern(List names, boolean includeSubtypes, int dim, int endPos, boolean isVarArg, TypePatternList typeParams) {
public WildTypePattern(List<NamePattern> names, boolean includeSubtypes, int dim, int endPos, boolean isVarArg, TypePatternList typeParams) {
this((NamePattern[]) names.toArray(new NamePattern[names.size()]), includeSubtypes, dim, isVarArg, typeParams);
this.end = endPos;
}
@@ -588,7 +588,7 @@ public class WildTypePattern extends TypePattern {
}

@Override
public TypePattern parameterizeWith(Map typeVariableMap, World w) {
public TypePattern parameterizeWith(Map<String,UnresolvedType> typeVariableMap, World w) {
NamePattern[] newNamePatterns = new NamePattern[namePatterns.length];
for (int i = 0; i < namePatterns.length; i++) {
newNamePatterns[i] = namePatterns[i];

+ 16
- 16
testing/src/org/aspectj/testing/harness/bridge/AjcTest.java View File

@@ -107,22 +107,22 @@ public class AjcTest extends RunSpecIterator {
private static final String REQUIRE_KEYWORDS = "RequireKeywords=";
private static final String SKIP_KEYWORDS = "SkipKeywords=";
private static final String PICK_PR = "PR=";
private static final List VALID_SUFFIXES
private static final List<String> VALID_SUFFIXES
= Collections.unmodifiableList(Arrays.asList(new String[]
{ TITLE_LIST, TITLE_FAIL_LIST, TITLE_CONTAINS,
REQUIRE_KEYWORDS, SKIP_KEYWORDS, PICK_PR }));
/** Map String titlesName to List (String) of titles to accept */
private static final Map TITLES = new HashMap();
private static final Map<String,List<String>> TITLES = new HashMap<String,List<String>>();
private static List getTitles(String titlesName) {
private static List<String> getTitles(String titlesName) {
return getTitles(titlesName, false);
}
private static List getTitles(String titlesName, boolean fail) {
private static List<String> getTitles(String titlesName, boolean fail) {
if (LangUtil.isEmpty(titlesName)) {
return Collections.EMPTY_LIST;
return Collections.emptyList();
}
List result = (List) TITLES.get(titlesName);
List<String> result = (List<String>) TITLES.get(titlesName);
if (null == result) {
result = makeTitlesList(titlesName, fail);
TITLES.put(titlesName, result);
@@ -140,7 +140,7 @@ public class AjcTest extends RunSpecIterator {
* @param fail if true, only read titles prefixed "FAIL" from files
* @return the unmodifiable List of titles (maybe empty, never null)
*/
private static List makeTitlesList(String titlesKey, boolean fail) {
private static List<String> makeTitlesList(String titlesKey, boolean fail) {
File file = new File(titlesKey);
return file.canRead()
? readTitlesFile(file, fail)
@@ -154,8 +154,8 @@ public class AjcTest extends RunSpecIterator {
* @param titlesList a comma-delimited String of titles
* @return the unmodifiable List of titles (maybe empty, never null)
*/
private static List parseTitlesList(String titlesList) {
ArrayList result = new ArrayList();
private static List<String> parseTitlesList(String titlesList) {
ArrayList<String> result = new ArrayList<String>();
String last = null;
StringTokenizer st = new StringTokenizer(titlesList, ",");
while (st.hasMoreTokens()) {
@@ -199,8 +199,8 @@ public class AjcTest extends RunSpecIterator {
* @param fail if true, only select titles prefixed "FAIL"
* @return the unmodifiable List of titles (maybe empty, never null)
*/
private static List readTitlesFile(File titlesFile, boolean fail) {
ArrayList result = new ArrayList();
private static List<String> readTitlesFile(File titlesFile, boolean fail) {
ArrayList<String> result = new ArrayList<String>();
Reader reader = null;
try {
reader = new FileReader(titlesFile);
@@ -376,8 +376,8 @@ public class AjcTest extends RunSpecIterator {
}
option = option.substring(OPTION_PREFIX.length());
boolean keywordMustExist = false;
List permittedTitles = null;
List permittedTitleStrings = null;
List<String> permittedTitles = null;
List<String> permittedTitleStrings = null;
String havePr = null;
if (option.startsWith(REQUIRE_KEYWORDS)) {
option = option.substring(REQUIRE_KEYWORDS.length());
@@ -407,7 +407,7 @@ public class AjcTest extends RunSpecIterator {
}
if (null != permittedTitleStrings) {
boolean gotHit = false;
for (Iterator iter = permittedTitleStrings.iterator();
for (Iterator<String> iter = permittedTitleStrings.iterator();
!gotHit && iter.hasNext();
) {
String substring = (String) iter.next();
@@ -434,9 +434,9 @@ public class AjcTest extends RunSpecIterator {
}
} else {
// all other options handled as comma-delimited lists
List specs = LangUtil.commaSplit(option);
List<String> specs = LangUtil.commaSplit(option);
// XXX also throw Error on empty specs...
for (Iterator iter = specs.iterator(); iter.hasNext();) {
for (Iterator<String> iter = specs.iterator(); iter.hasNext();) {
String spec = (String) iter.next();
if (null != havePr) {
if (havePr.equals(spec)) { // String.equals()

+ 3
- 3
tests/src/org/aspectj/systemtest/incremental/tools/AjdeInteractionTestbed.java View File

@@ -77,7 +77,7 @@ public class AjdeInteractionTestbed extends TestCase {
}

public void addXmlConfigFile(String projectName, String xmlfile) {
List l = new ArrayList();
List<String> l = new ArrayList<String>();
l.add(xmlfile);
AjCompiler compiler = CompilerFactory.getCompilerForProjectWithDir(sandboxDir + File.separator + projectName);
((MultiProjTestCompilerConfiguration) compiler.getCompilerConfiguration()).setProjectXmlConfigFiles(l);
@@ -106,7 +106,7 @@ public class AjdeInteractionTestbed extends TestCase {

public void configureAspectPath(String projectName, File aspectpath) {
AjCompiler compiler = CompilerFactory.getCompilerForProjectWithDir(sandboxDir + File.separator + projectName);
Set s = new HashSet();
Set<File> s = new HashSet<File>();
s.add(aspectpath);
((MultiProjTestCompilerConfiguration) compiler.getCompilerConfiguration()).setAspectPath(s);
}
@@ -121,7 +121,7 @@ public class AjdeInteractionTestbed extends TestCase {
((MultiProjTestCompilerConfiguration) compiler.getCompilerConfiguration()).setJavaOptions(options);
}

public static void configureInPath(String projectName, Set inpath) {
public static void configureInPath(String projectName, Set<File> inpath) {
AjCompiler compiler = CompilerFactory.getCompilerForProjectWithDir(sandboxDir + File.separator + projectName);
((MultiProjTestCompilerConfiguration) compiler.getCompilerConfiguration()).setInpath(inpath);
}

+ 3
- 4
weaver/testsrc/org/aspectj/weaver/WeaverMessagesTestCase.java View File

@@ -18,16 +18,15 @@ import java.util.MissingResourceException;
import junit.framework.TestCase;

/**
* @author colyer
*
* @author Adrian Colyer
*/
public class WeaverMessagesTestCase extends TestCase {
public void testAllMessagesDefined() {
Class wmClass = WeaverMessages.class;
Class<?> wmClass = WeaverMessages.class;
Field[] fields = wmClass.getDeclaredFields();
List fieldList = new ArrayList();
List<String> fieldList = new ArrayList<String>();
for (int i = 0; i < fields.length; i++) {
Field f = fields[i];
if (f.getType() == String.class) {

+ 0
- 2
weaver/testsrc/org/aspectj/weaver/tools/cache/WeavedClassCacheTest.java View File

@@ -18,8 +18,6 @@ import org.aspectj.bridge.IMessage;
import org.aspectj.bridge.IMessageHandler;
import org.aspectj.weaver.tools.GeneratedClassHandler;

import java.net.URL;
import java.net.URLClassLoader;
import java.util.HashMap;
import java.util.LinkedList;
import java.util.List;

Loading…
Cancel
Save