Skip to content

Commit a094516

Browse files
committed
Remove unnecessary casts.
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/io/trunk@606380 13f79535-47bb-0310-9956-ffa450edef68
1 parent bf8f5bc commit a094516

3 files changed

Lines changed: 6 additions & 6 deletions

File tree

src/test/org/apache/commons/io/FileSystemUtilsTestCase.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -90,14 +90,14 @@ public void testGetFreeSpace_String() throws Exception {
9090
long free = FileSystemUtils.freeSpace("/");
9191
long kb = FileSystemUtils.freeSpaceKb("/");
9292
if (kilobyteBlock) {
93-
assertEquals((double) free, (double) kb, 256d);
93+
assertEquals(free, kb, 256d);
9494
} else {
95-
assertEquals((double) free / 2d, (double) kb, 256d);
95+
assertEquals(free / 2d, kb, 256d);
9696
}
9797
} else {
9898
long bytes = FileSystemUtils.freeSpace("");
9999
long kb = FileSystemUtils.freeSpaceKb("");
100-
assertEquals((double) bytes / 1024, (double) kb, 256d);
100+
assertEquals((double) bytes / 1024, kb, 256d);
101101
}
102102
}
103103

src/test/org/apache/commons/io/filefilter/ConditionalFileFilterAbstractTestCase.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ public void testRemove() {
7878
filters.add(new TesterTrueFileFilter());
7979
for(int i = 0; i < filters.size(); i++) {
8080
fileFilter.removeFileFilter((IOFileFilter) filters.get(i));
81-
assertTrue("file filter removed", !fileFilter.getFileFilters().contains((IOFileFilter) filters.get(i)));
81+
assertTrue("file filter removed", !fileFilter.getFileFilters().contains(filters.get(i)));
8282
}
8383
assertEquals("file filters count", 0, fileFilter.getFileFilters().size());
8484
}

src/test/org/apache/commons/io/input/SwappedDataInputStreamTest.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ public void testReadFully() throws IOException {
8787
}
8888

8989
public void testReadInt() throws IOException {
90-
assertEquals( (int) 0x04030201, this.sdis.readInt() );
90+
assertEquals( 0x04030201, this.sdis.readInt() );
9191
}
9292

9393
public void testReadLine() throws IOException {
@@ -124,7 +124,7 @@ public void testReadUTF() throws IOException {
124124

125125
public void testSkipBytes() throws IOException {
126126
this.sdis.skipBytes(4);
127-
assertEquals( (int)0x08070605, this.sdis.readInt() );
127+
assertEquals( 0x08070605, this.sdis.readInt() );
128128
}
129129

130130
}

0 commit comments

Comments
 (0)