Skip to content

Commit 969434f

Browse files
committed
Comments and longer lines
1 parent e45b048 commit 969434f

File tree

1 file changed

+9
-23
lines changed

1 file changed

+9
-23
lines changed

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

+9-23
Original file line numberDiff line numberDiff line change
@@ -548,42 +548,28 @@ public void testContentEquals() throws Exception {
548548
assertTrue(FileUtils.contentEquals(null, null));
549549
assertFalse(FileUtils.contentEquals(null, file));
550550
assertFalse(FileUtils.contentEquals(file, null));
551-
// both don't exist
551+
// both don't exist
552552
assertTrue(FileUtils.contentEquals(file, file));
553553
assertTrue(FileUtils.contentEquals(file, file2));
554554
assertTrue(FileUtils.contentEquals(file2, file2));
555555
assertTrue(FileUtils.contentEquals(file2, file));
556-
557556
// Directories
558557
assertThrows(IllegalArgumentException.class, () -> FileUtils.contentEquals(tempDirFile, tempDirFile));
559-
560558
// Different files
561-
final File objFile1 =
562-
new File(tempDirFile, getName() + ".object");
563-
FileUtils.copyURLToFile(
564-
getClass().getResource("/java/lang/Object.class"),
565-
objFile1);
566-
567-
final File objFile1b =
568-
new File(tempDirFile, getName() + ".object2");
569-
FileUtils.copyURLToFile(
570-
getClass().getResource("/java/lang/Object.class"),
571-
objFile1b);
572-
573-
final File objFile2 =
574-
new File(tempDirFile, getName() + ".collection");
575-
FileUtils.copyURLToFile(
576-
getClass().getResource("/java/util/Collection.class"),
577-
objFile2);
578-
559+
final File objFile1 = new File(tempDirFile, getName() + ".object");
560+
FileUtils.copyURLToFile(getClass().getResource("/java/lang/Object.class"), objFile1);
561+
final File objFile1b = new File(tempDirFile, getName() + ".object2");
562+
FileUtils.copyURLToFile(getClass().getResource("/java/lang/Object.class"), objFile1b);
563+
final File objFile2 = new File(tempDirFile, getName() + ".collection");
564+
FileUtils.copyURLToFile(getClass().getResource("/java/util/Collection.class"), objFile2);
565+
// equals to other
579566
assertFalse(FileUtils.contentEquals(objFile1, objFile2));
580567
assertFalse(FileUtils.contentEquals(objFile1b, objFile2));
581568
assertTrue(FileUtils.contentEquals(objFile1, objFile1b));
582-
569+
// equals to self
583570
assertTrue(FileUtils.contentEquals(objFile1, objFile1));
584571
assertTrue(FileUtils.contentEquals(objFile1b, objFile1b));
585572
assertTrue(FileUtils.contentEquals(objFile2, objFile2));
586-
587573
// Equal files
588574
file.createNewFile();
589575
file2.createNewFile();

0 commit comments

Comments
 (0)