*/
public class AjcSpecXmlReaderTest extends TestCase {
- ArrayList tempFiles = new ArrayList();
+ ArrayList<File> tempFiles = new ArrayList<File>();
/**
* Constructor for AjcSpecXmlReaderTest.
* @param name
public void tearDown() {
if (!LangUtil.isEmpty(tempFiles)) {
- for (Iterator iter = tempFiles.iterator(); iter.hasNext();) {
+ for (Iterator<File> iter = tempFiles.iterator(); iter.hasNext();) {
File file = (File) iter.next();
if (file.canRead()) {
file.delete();
= AjcSpecXmlReader.expectedProperties();
PropertyDescriptor[] des;
for (int i = 0; i < expected.length; i++) {
- Class clazz = expected[i].cl;
+ Class<?> clazz = expected[i].cl;
BeanInfo beanInfo = Introspector.getBeanInfo(clazz);
assertTrue(null != beanInfo);
des = beanInfo.getPropertyDescriptors();
String xml2Path = path + ".tmp.xml";
final File file1 = new File(xmlPath);
- final ArrayList toDelete = new ArrayList();
+ final ArrayList<File> toDelete = new ArrayList<File>();
final AjcSpecXmlReader writer = AjcSpecXmlReader.getReader();
assertTrue("" + file1, file1.canRead());
assertTrue("CloneNotSupportedException: " + e.getMessage(), false);
}
- for (Iterator iter = toDelete.iterator(); iter.hasNext();) {
- ((File) iter.next()).delete();
+ for (Iterator<File> iter = toDelete.iterator(); iter.hasNext();) {
+ iter.next().delete();
}
}
AjcSpecXmlReader writer = AjcSpecXmlReader.getReader();
File file0 = new File(txtPath);
File file1 = new File(xmlPath);
- ArrayList toDelete = new ArrayList();
+ ArrayList<File> toDelete = new ArrayList<File>();
AjcTest.Suite.Spec suite0 = null;
if (file0.canRead()) {
System.out.println("reading " + file0);
AjcSpecTest.sameAjcSuiteSpec(suite1, suite2, this);
AjcSpecTest.sameAjcSuiteSpec(suite0, suite2, this);
- for (Iterator iter = toDelete.iterator(); iter.hasNext();) {
- ((File) iter.next()).delete();
+ for (Iterator<File> iter = toDelete.iterator(); iter.hasNext();) {
+ iter.next().delete();
}
}
}