commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From s...@apache.org
Subject svn commit: r896988 - in /commons/proper/io/trunk/src/test/org/apache/commons/io: ./ comparator/ filefilter/
Date Thu, 07 Jan 2010 19:59:12 GMT
Author: sebb
Date: Thu Jan  7 19:59:11 2010
New Revision: 896988

URL: http://svn.apache.org/viewvc?rev=896988&view=rev
Log:
Fix up raw types in test code

Modified:
    commons/proper/io/trunk/src/test/org/apache/commons/io/DirectoryWalkerTestCase.java
    commons/proper/io/trunk/src/test/org/apache/commons/io/FileUtilsListFilesTestCase.java
    commons/proper/io/trunk/src/test/org/apache/commons/io/FileUtilsTestCase.java
    commons/proper/io/trunk/src/test/org/apache/commons/io/IOUtilsTestCase.java
    commons/proper/io/trunk/src/test/org/apache/commons/io/IOUtilsWriteTestCase.java
    commons/proper/io/trunk/src/test/org/apache/commons/io/LineIteratorTestCase.java
    commons/proper/io/trunk/src/test/org/apache/commons/io/comparator/ComparatorAbstractTestCase.java
    commons/proper/io/trunk/src/test/org/apache/commons/io/comparator/CompositeFileComparatorTest.java
    commons/proper/io/trunk/src/test/org/apache/commons/io/filefilter/AndFileFilterTestCase.java
    commons/proper/io/trunk/src/test/org/apache/commons/io/filefilter/ConditionalFileFilterAbstractTestCase.java
    commons/proper/io/trunk/src/test/org/apache/commons/io/filefilter/OrFileFilterTestCase.java

Modified: commons/proper/io/trunk/src/test/org/apache/commons/io/DirectoryWalkerTestCase.java
URL: http://svn.apache.org/viewvc/commons/proper/io/trunk/src/test/org/apache/commons/io/DirectoryWalkerTestCase.java?rev=896988&r1=896987&r2=896988&view=diff
==============================================================================
--- commons/proper/io/trunk/src/test/org/apache/commons/io/DirectoryWalkerTestCase.java (original)
+++ commons/proper/io/trunk/src/test/org/apache/commons/io/DirectoryWalkerTestCase.java Thu Jan  7 19:59:11 2010
@@ -98,7 +98,7 @@
      * Test Filtering
      */
     public void testFilter() {
-        List results = new TestFileFinder(dirsAndFilesFilter, -1).find(javaDir);
+        List<File> results = new TestFileFinder(dirsAndFilesFilter, -1).find(javaDir);
         assertEquals("Result Size", (1 + dirs.length + ioFiles.length + outputFiles.length), results.size());
         assertTrue("Start Dir", results.contains(javaDir));
         checkContainsFiles("Dir", dirs, results);
@@ -110,7 +110,7 @@
      * Test Filtering and limit to depth 0
      */
     public void testFilterAndLimitA() {
-        List results = new TestFileFinder(NOT_SVN, 0).find(javaDir);
+        List<File> results = new TestFileFinder(NOT_SVN, 0).find(javaDir);
         assertEquals("[A] Result Size", 1, results.size());
         assertTrue("[A] Start Dir",   results.contains(javaDir));
     }
@@ -119,7 +119,7 @@
      * Test Filtering and limit to depth 1
      */
     public void testFilterAndLimitB() {
-        List results = new TestFileFinder(NOT_SVN, 1).find(javaDir);
+        List<File> results = new TestFileFinder(NOT_SVN, 1).find(javaDir);
         assertEquals("[B] Result Size", 2, results.size());
         assertTrue("[B] Start Dir",   results.contains(javaDir));
         assertTrue("[B] Org Dir",     results.contains(orgDir));
@@ -129,7 +129,7 @@
      * Test Filtering and limit to depth 3
      */
     public void testFilterAndLimitC() {
-        List results = new TestFileFinder(NOT_SVN, 3).find(javaDir);
+        List<File> results = new TestFileFinder(NOT_SVN, 3).find(javaDir);
         assertEquals("[C] Result Size", 4, results.size());
         assertTrue("[C] Start Dir",   results.contains(javaDir));
         assertTrue("[C] Org Dir",     results.contains(orgDir));
@@ -141,7 +141,7 @@
      * Test Filtering and limit to depth 5
      */
     public void testFilterAndLimitD() {
-        List results = new TestFileFinder(dirsAndFilesFilter, 5).find(javaDir);
+        List<File> results = new TestFileFinder(dirsAndFilesFilter, 5).find(javaDir);
         assertEquals("[D] Result Size", (1 + dirs.length + ioFiles.length), results.size());
         assertTrue("[D] Start Dir", results.contains(javaDir));
         checkContainsFiles("[D] Dir", dirs, results);
@@ -152,7 +152,7 @@
      * Test separate dir and file filters
      */
     public void testFilterDirAndFile1() {
-        List results = new TestFileFinder(dirsFilter, iofilesFilter, -1).find(javaDir);
+        List<File> results = new TestFileFinder(dirsFilter, iofilesFilter, -1).find(javaDir);
         assertEquals("[DirAndFile1] Result Size", (1 + dirs.length + ioFiles.length), results.size());
         assertTrue("[DirAndFile1] Start Dir", results.contains(javaDir));
         checkContainsFiles("[DirAndFile1] Dir", dirs, results);
@@ -163,7 +163,7 @@
      * Test separate dir and file filters
      */
     public void testFilterDirAndFile2() {
-        List results = new TestFileFinder((IOFileFilter) null, (IOFileFilter) null, -1).find(javaDir);
+        List<File> results = new TestFileFinder((IOFileFilter) null, (IOFileFilter) null, -1).find(javaDir);
         assertTrue("[DirAndFile2] Result Size", results.size() > (1 + dirs.length + ioFiles.length));
         assertTrue("[DirAndFile2] Start Dir", results.contains(javaDir));
         checkContainsFiles("[DirAndFile2] Dir", dirs, results);
@@ -174,8 +174,8 @@
      * Test separate dir and file filters
      */
     public void testFilterDirAndFile3() {
-        List results = new TestFileFinder(dirsFilter, (IOFileFilter) null, -1).find(javaDir);
-        List resultDirs = directoriesOnly(results);
+        List<File> results = new TestFileFinder(dirsFilter, (IOFileFilter) null, -1).find(javaDir);
+        List<File> resultDirs = directoriesOnly(results);
         assertEquals("[DirAndFile3] Result Size", (1 + dirs.length), resultDirs.size());
         assertTrue("[DirAndFile3] Start Dir", results.contains(javaDir));
         checkContainsFiles("[DirAndFile3] Dir", dirs, resultDirs);
@@ -185,8 +185,8 @@
      * Test separate dir and file filters
      */
     public void testFilterDirAndFile4() {
-        List results = new TestFileFinder((IOFileFilter) null, iofilesFilter, -1).find(javaDir);
-        List resultFiles = filesOnly(results);
+        List<File> results = new TestFileFinder((IOFileFilter) null, iofilesFilter, -1).find(javaDir);
+        List<File> resultFiles = filesOnly(results);
         assertEquals("[DirAndFile4] Result Size", ioFiles.length, resultFiles.size());
         assertTrue("[DirAndFile4] Start Dir", results.contains(javaDir));
         checkContainsFiles("[DirAndFile4] File", ioFiles, resultFiles);
@@ -196,7 +196,7 @@
      * Test Limiting to current directory
      */
     public void testLimitToCurrent() {
-        List results = new TestFileFinder(null, 0).find(current);
+        List<File> results = new TestFileFinder(null, 0).find(current);
         assertEquals("Result Size", 1, results.size());
         assertTrue("Current Dir", results.contains(new File(".")));
     }
@@ -208,7 +208,7 @@
 
         // TODO is this what we want with invalid directory?
         File invalidDir = new File("invalid-dir");
-        List results = new TestFileFinder(null, -1).find(invalidDir);
+        List<File> results = new TestFileFinder(null, -1).find(invalidDir);
         assertEquals("Result Size", 1, results.size());
         assertTrue("Current Dir", results.contains(invalidDir));
  
@@ -225,7 +225,7 @@
      */
     public void testHandleStartDirectoryFalse() {
 
-        List results = new TestFalseFileFinder(null, -1).find(current);
+        List<File> results = new TestFalseFileFinder(null, -1).find(current);
         assertEquals("Result Size", 0, results.size());
 
     }
@@ -235,7 +235,7 @@
     /**
      * Check the files in the array are in the results list.
      */
-    private void checkContainsFiles(String prefix, File[] files, Collection results) {
+    private void checkContainsFiles(String prefix, File[] files, Collection<File> results) {
         for (int i = 0; i < files.length; i++) {
             assertTrue(prefix + "["+i+"] " + files[i], results.contains(files[i]));
         }
@@ -244,10 +244,10 @@
     /**
      * Extract the directories.
      */
-    private List directoriesOnly(Collection results) {
-        List list = new ArrayList(results.size());
-        for (Iterator it = results.iterator(); it.hasNext(); ) {
-            File file = (File) it.next();
+    private List<File> directoriesOnly(Collection<File> results) {
+        List<File> list = new ArrayList<File>(results.size());
+        for (Iterator<File> it = results.iterator(); it.hasNext(); ) {
+            File file = it.next();
             if (file.isDirectory()) {
                 list.add(file);
             }
@@ -258,10 +258,10 @@
     /**
      * Extract the files.
      */
-    private List filesOnly(Collection results) {
-        List list = new ArrayList(results.size());
-        for (Iterator it = results.iterator(); it.hasNext(); ) {
-            File file = (File) it.next();
+    private List<File> filesOnly(Collection<File> results) {
+        List<File> list = new ArrayList<File>(results.size());
+        for (Iterator<File> it = results.iterator(); it.hasNext(); ) {
+            File file = it.next();
             if (file.isFile()) {
                 list.add(file);
             }
@@ -313,8 +313,8 @@
 
         // Suppress CancelException (use same file name as preceeding test)
         try {
-            List results = new TestCancelWalker(cancelName, true).find(javaDir);
-            File lastFile = (File)results.get(results.size() - 1);
+            List<File> results = new TestCancelWalker(cancelName, true).find(javaDir);
+            File lastFile = results.get(results.size() - 1);
             assertEquals("Suppress:  " + cancelName,   cancelName, lastFile.getName());
         } catch(IOException ex) {
             fail("Suppress threw " + ex);
@@ -335,7 +335,7 @@
             walker.find(javaDir);
             fail("CancelException not thrown for '" + cancelName + "'");
         } catch (DirectoryWalker.CancelException cancel) {
-            File last = (File) walker.results.get(walker.results.size() - 1);
+            File last = walker.results.get(walker.results.size() - 1);
             assertEquals(cancelName, last.getName());
             assertEquals("Depth: " + cancelName,  5, cancel.getDepth());
         } catch(IOException ex) {
@@ -358,8 +358,8 @@
         // Suppress CancelException (use same file name as preceeding test)
         try {
             walker = new TestMultiThreadCancelWalker(cancelName, true);
-            List results = walker.find(javaDir);
-            File lastFile = (File) results.get(results.size() - 1);
+            List<File> results = walker.find(javaDir);
+            File lastFile = results.get(results.size() - 1);
             assertEquals("Suppress:  " + cancelName, cancelName, lastFile.getName());
         } catch(IOException ex) {
             fail("Suppress threw " + ex);
@@ -384,8 +384,8 @@
         }
 
         /** find files. */
-        protected List find(File startDirectory) {
-           List results = new ArrayList();
+        protected List<File> find(File startDirectory) {
+           List<File> results = new ArrayList<File>();
            try {
                walk(startDirectory, results);
            } catch(IOException ex) {
@@ -443,8 +443,8 @@
         }
 
         /** find files. */
-        protected List find(File startDirectory) throws IOException {
-           List results = new ArrayList();
+        protected List<File> find(File startDirectory) throws IOException {
+           List<File> results = new ArrayList<File>();
            walk(startDirectory, results);
            return results;
         }
@@ -485,7 +485,7 @@
         private String cancelFileName;
         private boolean suppressCancel;
         private boolean cancelled;
-        public List results;
+        public List<File> results;
 
         TestMultiThreadCancelWalker(String cancelFileName, boolean suppressCancel) {
             super();
@@ -494,8 +494,8 @@
         }
 
         /** find files. */
-        protected List find(File startDirectory) throws IOException {
-           results = new ArrayList();
+        protected List<File> find(File startDirectory) throws IOException {
+           results = new ArrayList<File>();
            walk(startDirectory, results);
            return results;
         }

Modified: commons/proper/io/trunk/src/test/org/apache/commons/io/FileUtilsListFilesTestCase.java
URL: http://svn.apache.org/viewvc/commons/proper/io/trunk/src/test/org/apache/commons/io/FileUtilsListFilesTestCase.java?rev=896988&r1=896987&r2=896988&view=diff
==============================================================================
--- commons/proper/io/trunk/src/test/org/apache/commons/io/FileUtilsListFilesTestCase.java (original)
+++ commons/proper/io/trunk/src/test/org/apache/commons/io/FileUtilsListFilesTestCase.java Thu Jan  7 19:59:11 2010
@@ -84,11 +84,11 @@
         FileUtils.deleteDirectory(dir);
     }
     
-    private Collection filesToFilenames(Collection files) {
-        Collection filenames = new java.util.ArrayList(files.size());
-        Iterator i = files.iterator();
+    private Collection<String> filesToFilenames(Collection<File> files) {
+        Collection<String> filenames = new java.util.ArrayList<String>(files.size());
+        Iterator<File> i = files.iterator();
         while (i.hasNext()) {
-            filenames.add(((File)i.next()).getName());
+            filenames.add(i.next().getName());
         }
         return filenames;
     }
@@ -96,9 +96,9 @@
     public void testListFilesByExtension() throws Exception {
         String[] extensions = {"xml", "txt"};
         
-        Collection files = FileUtils.listFiles(getLocalTestDirectory(), extensions, false);
+        Collection<File> files = FileUtils.listFiles(getLocalTestDirectory(), extensions, false);
         assertEquals(1, files.size());
-        Collection filenames = filesToFilenames(files);
+        Collection<String> filenames = filesToFilenames(files);
         assertTrue(filenames.contains("dummy-build.xml"));
         assertFalse(filenames.contains("README"));
         assertFalse(filenames.contains("dummy-file.txt"));
@@ -119,8 +119,8 @@
     }
 
     public void testListFiles() throws Exception {
-        Collection files;
-        Collection filenames;
+        Collection<File> files;
+        Collection<String> filenames;
         IOFileFilter fileFilter;
         IOFileFilter dirFilter;
         

Modified: commons/proper/io/trunk/src/test/org/apache/commons/io/FileUtilsTestCase.java
URL: http://svn.apache.org/viewvc/commons/proper/io/trunk/src/test/org/apache/commons/io/FileUtilsTestCase.java?rev=896988&r1=896987&r2=896988&view=diff
==============================================================================
--- commons/proper/io/trunk/src/test/org/apache/commons/io/FileUtilsTestCase.java (original)
+++ commons/proper/io/trunk/src/test/org/apache/commons/io/FileUtilsTestCase.java Thu Jan  7 19:59:11 2010
@@ -84,7 +84,7 @@
         return new TestSuite(FileUtilsTestCase.class);
     }
 
-    public FileUtilsTestCase(String name) throws IOException {
+    public FileUtilsTestCase(String name) {
         super(name);
 
         testFile1 = new File(getTestDirectory(), "file1-test.txt");
@@ -771,11 +771,11 @@
         File destDir       = new File(getTestDirectory(), "copydest");
 
         FileUtils.copyDirectory(grandParentDir, destDir, filter);
-        List files  = LIST_WALKER.list(destDir);
+        List<File> files  = LIST_WALKER.list(destDir);
         assertEquals(3, files.size());
-        assertEquals("parent", ((File)files.get(0)).getName());
-        assertEquals("child", ((File)files.get(1)).getName());
-        assertEquals("file3.txt", ((File)files.get(2)).getName());
+        assertEquals("parent", files.get(0).getName());
+        assertEquals("child", files.get(1).getName());
+        assertEquals("file3.txt", files.get(2).getName());
    }
 
     /** Test for IO-141 */
@@ -1015,7 +1015,7 @@
             createFile(theFile, fileSizes[i]);
         }
 
-        Collection files = FileUtils.listFiles(subDir,
+        Collection<File> files = FileUtils.listFiles(subDir,
                                                new WildcardFileFilter("*.*"),
                                                new WildcardFileFilter("*"));
 
@@ -1024,7 +1024,7 @@
 
         assertEquals(files.size(), fileNames.length);
 
-        Map foundFileNames = new HashMap();
+        Map<String, String> foundFileNames = new HashMap<String, String>();
 
         for (int i = 0; i < count; ++i) {
             boolean found = false;
@@ -1054,15 +1054,15 @@
             createFile(theFile, fileSizes[i]);
         }
 
-        Iterator files = FileUtils.iterateFiles(subDir,
+        Iterator<File> files = FileUtils.iterateFiles(subDir,
                                                 new WildcardFileFilter("*.*"),
                                                 new WildcardFileFilter("*"));
 
-        Map foundFileNames = new HashMap();
+        Map<String, String> foundFileNames = new HashMap<String, String>();
 
         while (files.hasNext()) {
             boolean found = false;
-            String fileName = ((File) files.next()).getName();
+            String fileName = files.next().getName();
 
             for (int j = 0; (( !found ) && (j < fileNames.length)); ++j) {
                 if ( fileNames[j].equals(fileName)) {
@@ -1109,7 +1109,7 @@
             String[] data = new String[] {"hello", "/u1234", "", "this is", "some text"};
             createLineBasedFile(file, data);
             
-            List lines = FileUtils.readLines(file, "UTF-8");
+            List<String> lines = FileUtils.readLines(file, "UTF-8");
             assertEquals(Arrays.asList(data), lines);
         } finally {
             deleteFile(file);
@@ -1154,7 +1154,7 @@
     public void testWriteLines_4arg() throws Exception {
         Object[] data = new Object[] {
             "hello", new StringBuffer("world"), "", "this is", null, "some text"};
-        List list = Arrays.asList(data);
+        List<Object> list = Arrays.asList(data);
         
         File file = newFile("lines.txt");
         FileUtils.writeLines(file, "US-ASCII", list, "*");
@@ -1166,7 +1166,7 @@
 
     public void testWriteLines_4arg_Writer_nullData() throws Exception {
         File file = newFile("lines.txt");
-        FileUtils.writeLines(file, "US-ASCII", (List) null, "*");
+        FileUtils.writeLines(file, "US-ASCII", (List<?>) null, "*");
         
         assertEquals("Sizes differ", 0, file.length());
     }
@@ -1174,7 +1174,7 @@
     public void testWriteLines_4arg_nullSeparator() throws Exception {
         Object[] data = new Object[] {
             "hello", new StringBuffer("world"), "", "this is", null, "some text"};
-        List list = Arrays.asList(data);
+        List<Object> list = Arrays.asList(data);
         
         File file = newFile("lines.txt");
         FileUtils.writeLines(file, "US-ASCII", list, null);
@@ -1189,7 +1189,7 @@
     public void testWriteLines_3arg_nullSeparator() throws Exception {
         Object[] data = new Object[] {
             "hello", new StringBuffer("world"), "", "this is", null, "some text"};
-        List list = Arrays.asList(data);
+        List<Object> list = Arrays.asList(data);
         
         File file = newFile("lines.txt");
         FileUtils.writeLines(file, "US-ASCII", list);
@@ -1671,8 +1671,8 @@
         ListDirectoryWalker() {
             super();
         }
-        List list(File startDirectory) throws IOException {
-            ArrayList files = new ArrayList();
+        List<File> list(File startDirectory) throws IOException {
+            ArrayList<File> files = new ArrayList<File>();
             walk(startDirectory, files);
             return files;
         }

Modified: commons/proper/io/trunk/src/test/org/apache/commons/io/IOUtilsTestCase.java
URL: http://svn.apache.org/viewvc/commons/proper/io/trunk/src/test/org/apache/commons/io/IOUtilsTestCase.java?rev=896988&r1=896987&r2=896988&view=diff
==============================================================================
--- commons/proper/io/trunk/src/test/org/apache/commons/io/IOUtilsTestCase.java (original)
+++ commons/proper/io/trunk/src/test/org/apache/commons/io/IOUtilsTestCase.java Thu Jan  7 19:59:11 2010
@@ -116,7 +116,6 @@
     //-----------------------------------------------------------------------
     /** Assert that the contents of two byte arrays are the same. */
     private void assertEqualContent( byte[] b0, byte[] b1 )
-        throws IOException
     {
         assertTrue( "Content not equal according to java.util.Arrays#equals()", Arrays.equals( b0, b1 ) );
     }
@@ -416,7 +415,7 @@
             createLineBasedFile(file, data);
             
             in = new FileInputStream(file);
-            List lines = IOUtils.readLines(in);
+            List<String> lines = IOUtils.readLines(in);
             assertEquals(Arrays.asList(data), lines);
             assertEquals(-1, in.read());
         } finally {
@@ -434,7 +433,7 @@
             createLineBasedFile(file, data);
             
             in = new FileInputStream(file);
-            List lines = IOUtils.readLines(in, "UTF-8");
+            List<String> lines = IOUtils.readLines(in, "UTF-8");
             assertEquals(Arrays.asList(data), lines);
             assertEquals(-1, in.read());
         } finally {
@@ -452,7 +451,7 @@
             createLineBasedFile(file, data);
             
             in = new InputStreamReader(new FileInputStream(file));
-            List lines = IOUtils.readLines(in);
+            List<String> lines = IOUtils.readLines(in);
             assertEquals(Arrays.asList(data), lines);
             assertEquals(-1, in.read());
         } finally {

Modified: commons/proper/io/trunk/src/test/org/apache/commons/io/IOUtilsWriteTestCase.java
URL: http://svn.apache.org/viewvc/commons/proper/io/trunk/src/test/org/apache/commons/io/IOUtilsWriteTestCase.java?rev=896988&r1=896987&r2=896988&view=diff
==============================================================================
--- commons/proper/io/trunk/src/test/org/apache/commons/io/IOUtilsWriteTestCase.java (original)
+++ commons/proper/io/trunk/src/test/org/apache/commons/io/IOUtilsWriteTestCase.java Thu Jan  7 19:59:11 2010
@@ -545,7 +545,7 @@
     public void testWriteLines_OutputStream() throws Exception {
         Object[] data = new Object[] {
             "hello", new StringBuffer("world"), "", "this is", null, "some text"};
-        List list = Arrays.asList(data);
+        List<Object> list = Arrays.asList(data);
         
         ByteArrayOutputStream baout = new ByteArrayOutputStream();
         YellOnFlushAndCloseOutputStream out = new YellOnFlushAndCloseOutputStream(baout, false, true);
@@ -564,7 +564,7 @@
         ByteArrayOutputStream baout = new ByteArrayOutputStream();
         YellOnFlushAndCloseOutputStream out = new YellOnFlushAndCloseOutputStream(baout, false, true);
         
-        IOUtils.writeLines((List) null, "*", out);
+        IOUtils.writeLines((List<?>) null, "*", out);
         out.off();
         out.flush();
         
@@ -573,7 +573,7 @@
 
     public void testWriteLines_OutputStream_nullSeparator() throws Exception {
         Object[] data = new Object[] {"hello", "world"};
-        List list = Arrays.asList(data);
+        List<Object> list = Arrays.asList(data);
             
         ByteArrayOutputStream baout = new ByteArrayOutputStream();
         YellOnFlushAndCloseOutputStream out = new YellOnFlushAndCloseOutputStream(baout, false, true);
@@ -589,7 +589,7 @@
 
     public void testWriteLines_OutputStream_nullStream() throws Exception {
         Object[] data = new Object[] {"hello", "world"};
-        List list = Arrays.asList(data);
+        List<Object> list = Arrays.asList(data);
         try {
             IOUtils.writeLines(list, "*", (OutputStream) null);
             fail();
@@ -600,7 +600,7 @@
     public void testWriteLines_OutputStream_Encoding() throws Exception {
         Object[] data = new Object[] {
             "hello\u8364", new StringBuffer("world"), "", "this is", null, "some text"};
-        List list = Arrays.asList(data);
+        List<Object> list = Arrays.asList(data);
         
         ByteArrayOutputStream baout = new ByteArrayOutputStream();
         YellOnFlushAndCloseOutputStream out = new YellOnFlushAndCloseOutputStream(baout, false, true);
@@ -619,7 +619,7 @@
         ByteArrayOutputStream baout = new ByteArrayOutputStream();
         YellOnFlushAndCloseOutputStream out = new YellOnFlushAndCloseOutputStream(baout, false, true);
         
-        IOUtils.writeLines((List) null, "*", out, "US-ASCII");
+        IOUtils.writeLines((List<?>) null, "*", out, "US-ASCII");
         out.off();
         out.flush();
         
@@ -628,7 +628,7 @@
 
     public void testWriteLines_OutputStream_Encoding_nullSeparator() throws Exception {
         Object[] data = new Object[] {"hello", "world"};
-        List list = Arrays.asList(data);
+        List<Object> list = Arrays.asList(data);
             
         ByteArrayOutputStream baout = new ByteArrayOutputStream();
         YellOnFlushAndCloseOutputStream out = new YellOnFlushAndCloseOutputStream(baout, false, true);
@@ -644,7 +644,7 @@
 
     public void testWriteLines_OutputStream_Encoding_nullStream() throws Exception {
         Object[] data = new Object[] {"hello", "world"};
-        List list = Arrays.asList(data);
+        List<Object> list = Arrays.asList(data);
         try {
             IOUtils.writeLines(list, "*", (OutputStream) null, "US-ASCII");
             fail();
@@ -654,7 +654,7 @@
     public void testWriteLines_OutputStream_Encoding_nullEncoding() throws Exception {
         Object[] data = new Object[] {
             "hello", new StringBuffer("world"), "", "this is", null, "some text"};
-        List list = Arrays.asList(data);
+        List<Object> list = Arrays.asList(data);
         
         ByteArrayOutputStream baout = new ByteArrayOutputStream();
         YellOnFlushAndCloseOutputStream out = new YellOnFlushAndCloseOutputStream(baout, false, true);
@@ -673,7 +673,7 @@
     public void testWriteLines_Writer() throws Exception {
         Object[] data = new Object[] {
             "hello", new StringBuffer("world"), "", "this is", null, "some text"};
-        List list = Arrays.asList(data);
+        List<Object> list = Arrays.asList(data);
         
         ByteArrayOutputStream baout = new ByteArrayOutputStream();
         YellOnFlushAndCloseOutputStream out = new YellOnFlushAndCloseOutputStream(baout, true, true);
@@ -694,7 +694,7 @@
         YellOnFlushAndCloseOutputStream out = new YellOnFlushAndCloseOutputStream(baout, true, true);
         Writer writer = new OutputStreamWriter(baout, "US-ASCII");
         
-        IOUtils.writeLines((List) null, "*", writer);
+        IOUtils.writeLines((List<?>) null, "*", writer);
         out.off();
         writer.flush();
         
@@ -703,7 +703,7 @@
 
     public void testWriteLines_Writer_nullSeparator() throws Exception {
         Object[] data = new Object[] {"hello", "world"};
-        List list = Arrays.asList(data);
+        List<Object> list = Arrays.asList(data);
             
         ByteArrayOutputStream baout = new ByteArrayOutputStream();
         YellOnFlushAndCloseOutputStream out = new YellOnFlushAndCloseOutputStream(baout, true, true);
@@ -720,7 +720,7 @@
 
     public void testWriteLines_Writer_nullStream() throws Exception {
         Object[] data = new Object[] {"hello", "world"};
-        List list = Arrays.asList(data);
+        List<Object> list = Arrays.asList(data);
         try {
             IOUtils.writeLines(list, "*", (Writer) null);
             fail();

Modified: commons/proper/io/trunk/src/test/org/apache/commons/io/LineIteratorTestCase.java
URL: http://svn.apache.org/viewvc/commons/proper/io/trunk/src/test/org/apache/commons/io/LineIteratorTestCase.java?rev=896988&r1=896987&r2=896988&view=diff
==============================================================================
--- commons/proper/io/trunk/src/test/org/apache/commons/io/LineIteratorTestCase.java (original)
+++ commons/proper/io/trunk/src/test/org/apache/commons/io/LineIteratorTestCase.java Thu Jan  7 19:59:11 2010
@@ -19,7 +19,6 @@
 import java.io.File;
 import java.io.FileNotFoundException;
 import java.io.FileReader;
-import java.io.IOException;
 import java.io.Reader;
 import java.io.UnsupportedEncodingException;
 import java.util.ArrayList;
@@ -49,7 +48,7 @@
         return new TestSuite(LineIteratorTestCase.class);
     }
 
-    public LineIteratorTestCase(String name) throws IOException {
+    public LineIteratorTestCase(String name) {
         super(name);
     }
 
@@ -177,12 +176,12 @@
         String encoding = null;
         
         File testFile = new File(getTestDirectory(), "LineIterator-nextOnly.txt");
-        List lines = createFile(testFile, encoding, 3);
+        List<String> lines = createFile(testFile, encoding, 3);
         
         LineIterator iterator = FileUtils.lineIterator(testFile, encoding);
         try {
             for (int i = 0; i < lines.size(); i++) {
-                String line = (String)iterator.next();
+                String line = iterator.next();
                 assertEquals("next() line " + i, lines.get(i), line);
             }
             assertEquals("No more expected", false, iterator.hasNext());
@@ -198,7 +197,7 @@
         String encoding = null;
         
         File testFile = new File(getTestDirectory(), "LineIterator-nextOnly.txt");
-        List lines = createFile(testFile, encoding, 3);
+        List<String> lines = createFile(testFile, encoding, 3);
         
         LineIterator iterator = FileUtils.lineIterator(testFile, encoding);
         try {
@@ -272,7 +271,7 @@
         
         String fileName = "LineIterator-" + lineCount + "-test.txt";
         File testFile = new File(getTestDirectory(), fileName);
-        List lines = createFile(testFile, encoding, lineCount);
+        List<String> lines = createFile(testFile, encoding, lineCount);
         
         LineIterator iterator = FileUtils.lineIterator(testFile, encoding);
         try {
@@ -285,7 +284,7 @@
     
             int idx = 0;
             while (iterator.hasNext()) {
-                String line = (String)iterator.next();
+                String line = iterator.next();
                 assertEquals("Comparing line " + idx, lines.get(idx), line);
                 assertTrue("Exceeded expected idx=" + idx + " size=" + lines.size(), idx < lines.size());
                 idx++;
@@ -314,8 +313,8 @@
      * Utility method to create a test file with a specified
      * number of lines.
      */
-    private List createFile(File file, String encoding, int lineCount) throws Exception {
-        List lines = new ArrayList();
+    private List<String> createFile(File file, String encoding, int lineCount) throws Exception {
+        List<String> lines = new ArrayList<String>();
         for (int i = 0; i < lineCount; i++) {
             lines.add("LINE " + i);
         }
@@ -329,7 +328,7 @@
         
         String fileName = "LineIterator-Filter-test.txt";
         File testFile = new File(getTestDirectory(), fileName);
-        List lines = createFile(testFile, encoding, 9);
+        List<String> lines = createFile(testFile, encoding, 9);
         
         Reader reader = new FileReader(testFile);
         LineIterator iterator = new LineIterator(reader) {
@@ -350,7 +349,7 @@
             int idx = 0;
             int actualLines = 0;
             while (iterator.hasNext()) {
-                String line = (String) iterator.next();
+                String line = iterator.next();
                 actualLines++;
                 assertEquals("Comparing line " + idx, lines.get(idx), line);
                 assertTrue("Exceeded expected idx=" + idx + " size=" + lines.size(), idx < lines.size());

Modified: commons/proper/io/trunk/src/test/org/apache/commons/io/comparator/ComparatorAbstractTestCase.java
URL: http://svn.apache.org/viewvc/commons/proper/io/trunk/src/test/org/apache/commons/io/comparator/ComparatorAbstractTestCase.java?rev=896988&r1=896987&r2=896988&view=diff
==============================================================================
--- commons/proper/io/trunk/src/test/org/apache/commons/io/comparator/ComparatorAbstractTestCase.java (original)
+++ commons/proper/io/trunk/src/test/org/apache/commons/io/comparator/ComparatorAbstractTestCase.java Thu Jan  7 19:59:11 2010
@@ -33,7 +33,7 @@
     protected AbstractFileComparator comparator;
 
     /** reverse comparator instance */
-    protected Comparator reverse;
+    protected Comparator<File> reverse;
 
     /** File which compares equal to  "equalFile2" */
     protected File equalFile1;
@@ -131,7 +131,7 @@
      * Test comparator list sort is null safe.
      */
     public void testSortListNull() {
-        assertNull(comparator.sort((List)null));
+        assertNull(comparator.sort((List<File>)null));
     }
 
     /**

Modified: commons/proper/io/trunk/src/test/org/apache/commons/io/comparator/CompositeFileComparatorTest.java
URL: http://svn.apache.org/viewvc/commons/proper/io/trunk/src/test/org/apache/commons/io/comparator/CompositeFileComparatorTest.java?rev=896988&r1=896987&r2=896988&view=diff
==============================================================================
--- commons/proper/io/trunk/src/test/org/apache/commons/io/comparator/CompositeFileComparatorTest.java (original)
+++ commons/proper/io/trunk/src/test/org/apache/commons/io/comparator/CompositeFileComparatorTest.java Thu Jan  7 19:59:11 2010
@@ -93,7 +93,7 @@
      * Test Constructor with null Iterable
      */
     public void testConstructorIterableNull() {
-        Comparator<File> c = new CompositeFileComparator((Iterable)null);
+        Comparator<File> c = new CompositeFileComparator((Iterable<Comparator<File>>)null);
         assertEquals("less,more", 0, c.compare(lessFile, moreFile));
         assertEquals("more,less", 0, c.compare(moreFile, lessFile));
         assertEquals("toString", "CompositeFileComparator{}", c.toString());
@@ -103,7 +103,7 @@
      * Test Constructor with null array
      */
     public void testConstructorArrayNull() {
-        Comparator<File> c = new CompositeFileComparator((Comparator[])null);
+        Comparator<File> c = new CompositeFileComparator((Comparator<File>[])null);
         assertEquals("less,more", 0, c.compare(lessFile, moreFile));
         assertEquals("more,less", 0, c.compare(moreFile, lessFile));
         assertEquals("toString", "CompositeFileComparator{}", c.toString());

Modified: commons/proper/io/trunk/src/test/org/apache/commons/io/filefilter/AndFileFilterTestCase.java
URL: http://svn.apache.org/viewvc/commons/proper/io/trunk/src/test/org/apache/commons/io/filefilter/AndFileFilterTestCase.java?rev=896988&r1=896987&r2=896988&view=diff
==============================================================================
--- commons/proper/io/trunk/src/test/org/apache/commons/io/filefilter/AndFileFilterTestCase.java (original)
+++ commons/proper/io/trunk/src/test/org/apache/commons/io/filefilter/AndFileFilterTestCase.java Thu Jan  7 19:59:11 2010
@@ -35,11 +35,11 @@
     return new TestSuite(AndFileFilterTestCase.class);
   }
   
-  private List testFilters;
-  private List testTrueResults;
-  private List testFalseResults;
-  private List testFileResults;
-  private List testFilenameResults;
+  private List<List<IOFileFilter>> testFilters;
+  private List<boolean[]> testTrueResults;
+  private List<boolean[]> testFalseResults;
+  private List<Boolean> testFileResults;
+  private List<Boolean> testFilenameResults;
   
   public AndFileFilterTestCase(final String name) {
     super(name);
@@ -52,16 +52,16 @@
   }
   
   @Override
-  protected IOFileFilter buildFilterUsingAdd(final List filters) {
+  protected IOFileFilter buildFilterUsingAdd(final List<IOFileFilter> filters) {
     AndFileFilter filter = new AndFileFilter();
     for(int i = 0; i < filters.size(); i++) {
-      filter.addFileFilter((IOFileFilter) filters.get(i));
+      filter.addFileFilter(filters.get(i));
     }
     return filter;
   }
   
   @Override
-  protected IOFileFilter buildFilterUsingConstructor(final List filters) {
+  protected IOFileFilter buildFilterUsingConstructor(final List<IOFileFilter> filters) {
     return new AndFileFilter(filters);
   }
   
@@ -76,27 +76,27 @@
   }
   
   @Override
-  protected List getFalseResults() {
+  protected List<boolean[]> getFalseResults() {
     return this.testFalseResults;
   }
   
   @Override
-  protected List getFileResults() {
+  protected List<Boolean> getFileResults() {
     return this.testFileResults;
   }
   
   @Override
-  protected List getFilenameResults() {
+  protected List<Boolean> getFilenameResults() {
     return this.testFilenameResults;
   }
   
   @Override
-  protected List getTestFilters() {
+  protected List<List<IOFileFilter>> getTestFilters() {
     return this.testFilters;
   }
   
   @Override
-  protected List getTrueResults() {
+  protected List<boolean[]> getTrueResults() {
     return this.testTrueResults;
   }
   
@@ -108,11 +108,11 @@
   private void setUpTestFilters() {
     // filters
     //tests
-    this.testFilters = new ArrayList();
-    this.testTrueResults = new ArrayList();
-    this.testFalseResults = new ArrayList();
-    this.testFileResults = new ArrayList();
-    this.testFilenameResults = new ArrayList();
+    this.testFilters = new ArrayList<List<IOFileFilter>>();
+    this.testTrueResults = new ArrayList<boolean[]>();
+    this.testFalseResults = new ArrayList<boolean[]>();
+    this.testFileResults = new ArrayList<Boolean>();
+    this.testFilenameResults = new ArrayList<Boolean>();
 
     // test 0 - add empty elements
     {
@@ -126,7 +126,7 @@
     // test 1 - Test conditional and with all filters returning true
     {
       // test 1 filters
-      List filters = new ArrayList();
+      List<IOFileFilter> filters = new ArrayList<IOFileFilter>();
       filters.add(trueFilters[1]);
       filters.add(trueFilters[2]);
       filters.add(trueFilters[3]);
@@ -145,7 +145,7 @@
     // test 2 - Test conditional and with first filter returning false
     {
       // test 2 filters
-      List filters = new ArrayList();
+      List<IOFileFilter> filters = new ArrayList<IOFileFilter>();
       filters.add(falseFilters[1]);
       filters.add(trueFilters[1]);
       filters.add(trueFilters[2]);
@@ -167,7 +167,7 @@
     // test 3 - Test conditional and with second filter returning false
     {
       // test 3 filters
-      List filters = new ArrayList();
+      List<IOFileFilter> filters = new ArrayList<IOFileFilter>();
       filters.add(trueFilters[1]);
       filters.add(falseFilters[1]);
       filters.add(trueFilters[2]);
@@ -189,7 +189,7 @@
     // test 4 - Test conditional and with third filter returning false
     {
       // test 4 filters
-      List filters = new ArrayList();
+      List<IOFileFilter> filters = new ArrayList<IOFileFilter>();
       filters.add(trueFilters[1]);
       filters.add(trueFilters[2]);
       filters.add(falseFilters[1]);
@@ -211,7 +211,7 @@
     // test 5 - Test conditional and with first and third filters returning false
     {
       // test 5 filters
-      List filters = new ArrayList();
+      List<IOFileFilter> filters = new ArrayList<IOFileFilter>();
       filters.add(falseFilters[1]);
       filters.add(trueFilters[1]);
       filters.add(falseFilters[2]);
@@ -232,7 +232,7 @@
     
     // test 6 - Test conditional and with second and third filters returning false
     {
-      List filters = new ArrayList();
+      List<IOFileFilter> filters = new ArrayList<IOFileFilter>();
       filters.add(trueFilters[1]);
       filters.add(falseFilters[1]);
       filters.add(falseFilters[2]);
@@ -253,7 +253,7 @@
     
     // test 7 - Test conditional and with first and second filters returning false
     {
-      List filters = new ArrayList();
+      List<IOFileFilter> filters = new ArrayList<IOFileFilter>();
       filters.add(falseFilters[1]);
       filters.add(falseFilters[2]);
       filters.add(trueFilters[3]);
@@ -274,7 +274,7 @@
     
     // test 8 - Test conditional and with fourth filters returning false
     {
-      List filters = new ArrayList();
+      List<IOFileFilter> filters = new ArrayList<IOFileFilter>();
       filters.add(trueFilters[1]);
       filters.add(trueFilters[2]);
       filters.add(trueFilters[3]);
@@ -293,7 +293,7 @@
 
     // test 9 - Test conditional and with all filters returning false
     {
-      List filters = new ArrayList();
+      List<IOFileFilter> filters = new ArrayList<IOFileFilter>();
       filters.add(falseFilters[1]);
       filters.add(falseFilters[2]);
       filters.add(falseFilters[3]);

Modified: commons/proper/io/trunk/src/test/org/apache/commons/io/filefilter/ConditionalFileFilterAbstractTestCase.java
URL: http://svn.apache.org/viewvc/commons/proper/io/trunk/src/test/org/apache/commons/io/filefilter/ConditionalFileFilterAbstractTestCase.java?rev=896988&r1=896987&r2=896988&view=diff
==============================================================================
--- commons/proper/io/trunk/src/test/org/apache/commons/io/filefilter/ConditionalFileFilterAbstractTestCase.java (original)
+++ commons/proper/io/trunk/src/test/org/apache/commons/io/filefilter/ConditionalFileFilterAbstractTestCase.java Thu Jan  7 19:59:11 2010
@@ -52,7 +52,7 @@
   }
   
   public void testAdd() {
-    List filters = new ArrayList();
+    List<TesterTrueFileFilter> filters = new ArrayList<TesterTrueFileFilter>();
     ConditionalFileFilter fileFilter = this.getConditionalFileFilter();
     filters.add(new TesterTrueFileFilter());
     filters.add(new TesterTrueFileFilter());
@@ -60,25 +60,25 @@
     filters.add(new TesterTrueFileFilter());
     for(int i = 0; i < filters.size(); i++) {
       assertEquals("file filters count: ", i, fileFilter.getFileFilters().size());
-      fileFilter.addFileFilter((IOFileFilter) filters.get(i));
+      fileFilter.addFileFilter(filters.get(i));
       assertEquals("file filters count: ", i+1, fileFilter.getFileFilters().size());
     }
-    for(Iterator iter = fileFilter.getFileFilters().iterator(); iter.hasNext();) {
-      IOFileFilter filter = (IOFileFilter) iter.next();
+    for(Iterator<IOFileFilter> iter = fileFilter.getFileFilters().iterator(); iter.hasNext();) {
+      IOFileFilter filter = iter.next();
       assertTrue("found file filter", filters.contains(filter));
     }
     assertEquals("file filters count", filters.size(), fileFilter.getFileFilters().size());
   }
   
   public void testRemove() {
-    List filters = new ArrayList();
+    List<TesterTrueFileFilter> filters = new ArrayList<TesterTrueFileFilter>();
     ConditionalFileFilter fileFilter = this.getConditionalFileFilter();
     filters.add(new TesterTrueFileFilter());
     filters.add(new TesterTrueFileFilter());
     filters.add(new TesterTrueFileFilter());
     filters.add(new TesterTrueFileFilter());
     for(int i = 0; i < filters.size(); i++) {
-      fileFilter.removeFileFilter((IOFileFilter) filters.get(i));
+      fileFilter.removeFileFilter(filters.get(i));
       assertTrue("file filter removed", !fileFilter.getFileFilters().contains(filters.get(i)));
     }
     assertEquals("file filters count", 0, fileFilter.getFileFilters().size());
@@ -92,18 +92,18 @@
   }
   
   public void testFilterBuiltUsingConstructor() throws Exception {
-    List testFilters = this.getTestFilters();
-    List testTrueResults = this.getTrueResults();
-    List testFalseResults = this.getFalseResults();
-    List testFileResults = this.getFileResults();
-    List testFilenameResults = this.getFilenameResults();
+    List<List<IOFileFilter>> testFilters = this.getTestFilters();
+    List<boolean []> testTrueResults = this.getTrueResults();
+    List<boolean []> testFalseResults = this.getFalseResults();
+    List<Boolean> testFileResults = this.getFileResults();
+    List<Boolean> testFilenameResults = this.getFilenameResults();
     
     for(int i = 1; i < testFilters.size(); i++) {
-      List filters = (List) testFilters.get(i);
-      boolean[] trueResults = (boolean []) testTrueResults.get(i);
-      boolean[] falseResults = (boolean []) testFalseResults.get(i);
-      boolean fileResults = ((Boolean) testFileResults.get(i)).booleanValue();
-      boolean filenameResults = ((Boolean) testFilenameResults.get(i)).booleanValue();
+      List<IOFileFilter> filters = testFilters.get(i);
+      boolean[] trueResults = testTrueResults.get(i);
+      boolean[] falseResults = testFalseResults.get(i);
+      boolean fileResults = testFileResults.get(i).booleanValue();
+      boolean filenameResults = testFilenameResults.get(i).booleanValue();
 
       // Test conditional AND filter created by passing filters to the constructor
       IOFileFilter filter = this.buildFilterUsingConstructor(filters);
@@ -125,18 +125,18 @@
   }
   
   public void testFilterBuiltUsingAdd() throws Exception {
-    List testFilters = this.getTestFilters();
-    List testTrueResults = this.getTrueResults();
-    List testFalseResults = this.getFalseResults();
-    List testFileResults = this.getFileResults();
-    List testFilenameResults = this.getFilenameResults();
+    List<List<IOFileFilter>> testFilters = this.getTestFilters();
+    List<boolean[]> testTrueResults = this.getTrueResults();
+    List<boolean[]> testFalseResults = this.getFalseResults();
+    List<Boolean> testFileResults = this.getFileResults();
+    List<Boolean> testFilenameResults = this.getFilenameResults();
     
     for(int i = 1; i < testFilters.size(); i++) {
-      List filters = (List) testFilters.get(i);
-      boolean[] trueResults = (boolean []) testTrueResults.get(i);
-      boolean[] falseResults = (boolean []) testFalseResults.get(i);
-      boolean fileResults = ((Boolean) testFileResults.get(i)).booleanValue();
-      boolean filenameResults = ((Boolean) testFilenameResults.get(i)).booleanValue();
+      List<IOFileFilter> filters = testFilters.get(i);
+      boolean[] trueResults = testTrueResults.get(i);
+      boolean[] falseResults = testFalseResults.get(i);
+      boolean fileResults = testFileResults.get(i).booleanValue();
+      boolean filenameResults = testFilenameResults.get(i).booleanValue();
 
       // Test conditional AND filter created by passing filters to the constructor
       IOFileFilter filter = this.buildFilterUsingAdd(filters);
@@ -158,13 +158,13 @@
   }
 
   protected abstract ConditionalFileFilter getConditionalFileFilter();
-  protected abstract IOFileFilter buildFilterUsingAdd(List filters);
-  protected abstract IOFileFilter buildFilterUsingConstructor(List filters);
-  protected abstract List getTestFilters();
-  protected abstract List getTrueResults();
-  protected abstract List getFalseResults();
-  protected abstract List getFileResults();
-  protected abstract List getFilenameResults();
+  protected abstract IOFileFilter buildFilterUsingAdd(List<IOFileFilter> filters);
+  protected abstract IOFileFilter buildFilterUsingConstructor(List<IOFileFilter> filters);
+  protected abstract List<List<IOFileFilter>> getTestFilters();
+  protected abstract List<boolean[]> getTrueResults();
+  protected abstract List<boolean[]> getFalseResults();
+  protected abstract List<Boolean> getFileResults();
+  protected abstract List<Boolean> getFilenameResults();
   protected abstract String getWorkingPathNamePropertyKey();
   protected abstract String getDefaultWorkingPath();
 }

Modified: commons/proper/io/trunk/src/test/org/apache/commons/io/filefilter/OrFileFilterTestCase.java
URL: http://svn.apache.org/viewvc/commons/proper/io/trunk/src/test/org/apache/commons/io/filefilter/OrFileFilterTestCase.java?rev=896988&r1=896987&r2=896988&view=diff
==============================================================================
--- commons/proper/io/trunk/src/test/org/apache/commons/io/filefilter/OrFileFilterTestCase.java (original)
+++ commons/proper/io/trunk/src/test/org/apache/commons/io/filefilter/OrFileFilterTestCase.java Thu Jan  7 19:59:11 2010
@@ -35,11 +35,11 @@
     return new TestSuite(OrFileFilterTestCase.class);
   }
   
-  private List testFilters;
-  private List testTrueResults;
-  private List testFalseResults;
-  private List testFileResults;
-  private List testFilenameResults;
+  private List<List<IOFileFilter>> testFilters;
+  private List<boolean[]> testTrueResults;
+  private List<boolean[]> testFalseResults;
+  private List<Boolean> testFileResults;
+  private List<Boolean> testFilenameResults;
   
   public OrFileFilterTestCase(final String name) {
     super(name);
@@ -52,16 +52,16 @@
   }
   
   @Override
-  protected IOFileFilter buildFilterUsingAdd(final List filters) {
+  protected IOFileFilter buildFilterUsingAdd(final List<IOFileFilter> filters) {
     OrFileFilter filter = new OrFileFilter();
     for(int i = 0; i < filters.size(); i++) {
-      filter.addFileFilter((IOFileFilter) filters.get(i));
+      filter.addFileFilter(filters.get(i));
     }
     return filter;
   }
   
   @Override
-  protected IOFileFilter buildFilterUsingConstructor(final List filters) {
+  protected IOFileFilter buildFilterUsingConstructor(final List<IOFileFilter> filters) {
     return new OrFileFilter(filters);
   }
   
@@ -76,27 +76,27 @@
   }
   
   @Override
-  protected List getFalseResults() {
+  protected List<boolean[]> getFalseResults() {
     return this.testFalseResults;
   }
   
   @Override
-  protected List getFileResults() {
+  protected List<Boolean> getFileResults() {
     return this.testFileResults;
   }
   
   @Override
-  protected List getFilenameResults() {
+  protected List<Boolean> getFilenameResults() {
     return this.testFilenameResults;
   }
   
   @Override
-  protected List getTestFilters() {
+  protected List<List<IOFileFilter>>  getTestFilters() {
     return this.testFilters;
   }
   
   @Override
-  protected List getTrueResults() {
+  protected List<boolean[]> getTrueResults() {
     return this.testTrueResults;
   }
   
@@ -108,11 +108,11 @@
   private void setUpTestFilters() {
     // filters
     //tests
-    this.testFilters = new ArrayList();
-    this.testTrueResults = new ArrayList();
-    this.testFalseResults = new ArrayList();
-    this.testFileResults = new ArrayList();
-    this.testFilenameResults = new ArrayList();
+    this.testFilters = new ArrayList<List<IOFileFilter>>();
+    this.testTrueResults = new ArrayList<boolean[]>();
+    this.testFalseResults = new ArrayList<boolean[]>();
+    this.testFileResults = new ArrayList<Boolean>();
+    this.testFilenameResults = new ArrayList<Boolean>();
 
     // test 0 - add empty elements
     {
@@ -126,7 +126,7 @@
     // test 1 - Test conditional or with all filters returning true
     {
       // test 1 filters
-      List filters = new ArrayList();
+      List<IOFileFilter> filters = new ArrayList<IOFileFilter>();
       filters.add(trueFilters[1]);
       filters.add(trueFilters[2]);
       filters.add(trueFilters[3]);
@@ -145,7 +145,7 @@
     // test 2 - Test conditional or with first filter returning false
     {
       // test 2 filters
-      List filters = new ArrayList();
+      List<IOFileFilter> filters = new ArrayList<IOFileFilter>();
       filters.add(falseFilters[1]);
       filters.add(trueFilters[1]);
       filters.add(trueFilters[2]);
@@ -167,7 +167,7 @@
     // test 3 - Test conditional or with second filter returning false
     {
       // test 3 filters
-      List filters = new ArrayList();
+      List<IOFileFilter> filters = new ArrayList<IOFileFilter>();
       filters.add(trueFilters[1]);
       filters.add(falseFilters[1]);
       filters.add(trueFilters[2]);
@@ -189,7 +189,7 @@
     // test 4 - Test conditional or with third filter returning false
     {
       // test 4 filters
-      List filters = new ArrayList();
+      List<IOFileFilter> filters = new ArrayList<IOFileFilter>();
       filters.add(trueFilters[1]);
       filters.add(trueFilters[2]);
       filters.add(falseFilters[1]);
@@ -211,7 +211,7 @@
     // test 5 - Test conditional or with first and third filters returning false
     {
       // test 5 filters
-      List filters = new ArrayList();
+      List<IOFileFilter> filters = new ArrayList<IOFileFilter>();
       filters.add(falseFilters[1]);
       filters.add(trueFilters[1]);
       filters.add(falseFilters[2]);
@@ -232,7 +232,7 @@
     
     // test 6 - Test conditional or with second and third filters returning false
     {
-      List filters = new ArrayList();
+      List<IOFileFilter> filters = new ArrayList<IOFileFilter>();
       filters.add(trueFilters[1]);
       filters.add(falseFilters[1]);
       filters.add(falseFilters[2]);
@@ -253,7 +253,7 @@
     
     // test 7 - Test conditional or with first and second filters returning false
     {
-      List filters = new ArrayList();
+      List<IOFileFilter> filters = new ArrayList<IOFileFilter>();
       filters.add(falseFilters[1]);
       filters.add(falseFilters[2]);
       filters.add(trueFilters[1]);
@@ -274,7 +274,7 @@
     
     // test 8 - Test conditional or with fourth filter returning false
     {
-      List filters = new ArrayList();
+      List<IOFileFilter> filters = new ArrayList<IOFileFilter>();
       filters.add(trueFilters[1]);
       filters.add(trueFilters[2]);
       filters.add(trueFilters[3]);
@@ -293,7 +293,7 @@
 
     // test 9 - Test conditional or with all filters returning false
     {
-      List filters = new ArrayList();
+      List<IOFileFilter> filters = new ArrayList<IOFileFilter>();
       filters.add(falseFilters[1]);
       filters.add(falseFilters[2]);
       filters.add(falseFilters[3]);



Mime
View raw message