commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ggreg...@apache.org
Subject svn commit: r606380 - in /commons/proper/io/trunk/src/test/org/apache/commons/io: FileSystemUtilsTestCase.java filefilter/ConditionalFileFilterAbstractTestCase.java input/SwappedDataInputStreamTest.java
Date Sat, 22 Dec 2007 01:58:50 GMT
Author: ggregory
Date: Fri Dec 21 17:58:46 2007
New Revision: 606380

URL: http://svn.apache.org/viewvc?rev=606380&view=rev
Log:
Remove unnecessary casts.

Modified:
    commons/proper/io/trunk/src/test/org/apache/commons/io/FileSystemUtilsTestCase.java
    commons/proper/io/trunk/src/test/org/apache/commons/io/filefilter/ConditionalFileFilterAbstractTestCase.java
    commons/proper/io/trunk/src/test/org/apache/commons/io/input/SwappedDataInputStreamTest.java

Modified: commons/proper/io/trunk/src/test/org/apache/commons/io/FileSystemUtilsTestCase.java
URL: http://svn.apache.org/viewvc/commons/proper/io/trunk/src/test/org/apache/commons/io/FileSystemUtilsTestCase.java?rev=606380&r1=606379&r2=606380&view=diff
==============================================================================
--- commons/proper/io/trunk/src/test/org/apache/commons/io/FileSystemUtilsTestCase.java (original)
+++ commons/proper/io/trunk/src/test/org/apache/commons/io/FileSystemUtilsTestCase.java Fri
Dec 21 17:58:46 2007
@@ -90,14 +90,14 @@
             long free = FileSystemUtils.freeSpace("/");
             long kb = FileSystemUtils.freeSpaceKb("/");
             if (kilobyteBlock) {
-                assertEquals((double) free, (double) kb, 256d);
+                assertEquals(free, kb, 256d);
             } else {
-                assertEquals((double) free / 2d, (double) kb, 256d);
+                assertEquals(free / 2d, kb, 256d);
             }
         } else {
             long bytes = FileSystemUtils.freeSpace("");
             long kb = FileSystemUtils.freeSpaceKb("");
-            assertEquals((double) bytes / 1024, (double) kb, 256d);
+            assertEquals((double) bytes / 1024, kb, 256d);
         }
     }
 

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=606380&r1=606379&r2=606380&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
Fri Dec 21 17:58:46 2007
@@ -78,7 +78,7 @@
     filters.add(new TesterTrueFileFilter());
     for(int i = 0; i < filters.size(); i++) {
       fileFilter.removeFileFilter((IOFileFilter) filters.get(i));
-      assertTrue("file filter removed", !fileFilter.getFileFilters().contains((IOFileFilter)
filters.get(i)));
+      assertTrue("file filter removed", !fileFilter.getFileFilters().contains(filters.get(i)));
     }
     assertEquals("file filters count", 0, fileFilter.getFileFilters().size());
   }

Modified: commons/proper/io/trunk/src/test/org/apache/commons/io/input/SwappedDataInputStreamTest.java
URL: http://svn.apache.org/viewvc/commons/proper/io/trunk/src/test/org/apache/commons/io/input/SwappedDataInputStreamTest.java?rev=606380&r1=606379&r2=606380&view=diff
==============================================================================
--- commons/proper/io/trunk/src/test/org/apache/commons/io/input/SwappedDataInputStreamTest.java
(original)
+++ commons/proper/io/trunk/src/test/org/apache/commons/io/input/SwappedDataInputStreamTest.java
Fri Dec 21 17:58:46 2007
@@ -87,7 +87,7 @@
     }
 
     public void testReadInt() throws IOException {
-        assertEquals( (int) 0x04030201, this.sdis.readInt() );
+        assertEquals( 0x04030201, this.sdis.readInt() );
     }
 
     public void testReadLine() throws IOException {
@@ -124,7 +124,7 @@
 
     public void testSkipBytes() throws IOException {
         this.sdis.skipBytes(4);
-        assertEquals( (int)0x08070605, this.sdis.readInt() );
+        assertEquals( 0x08070605, this.sdis.readInt() );
     }
 
 }



Mime
View raw message