@@ -548,42 +548,28 @@ public void testContentEquals() throws Exception {
548
548
assertTrue (FileUtils .contentEquals (null , null ));
549
549
assertFalse (FileUtils .contentEquals (null , file ));
550
550
assertFalse (FileUtils .contentEquals (file , null ));
551
- // both don't exist
551
+ // both don't exist
552
552
assertTrue (FileUtils .contentEquals (file , file ));
553
553
assertTrue (FileUtils .contentEquals (file , file2 ));
554
554
assertTrue (FileUtils .contentEquals (file2 , file2 ));
555
555
assertTrue (FileUtils .contentEquals (file2 , file ));
556
-
557
556
// Directories
558
557
assertThrows (IllegalArgumentException .class , () -> FileUtils .contentEquals (tempDirFile , tempDirFile ));
559
-
560
558
// 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
579
566
assertFalse (FileUtils .contentEquals (objFile1 , objFile2 ));
580
567
assertFalse (FileUtils .contentEquals (objFile1b , objFile2 ));
581
568
assertTrue (FileUtils .contentEquals (objFile1 , objFile1b ));
582
-
569
+ // equals to self
583
570
assertTrue (FileUtils .contentEquals (objFile1 , objFile1 ));
584
571
assertTrue (FileUtils .contentEquals (objFile1b , objFile1b ));
585
572
assertTrue (FileUtils .contentEquals (objFile2 , objFile2 ));
586
-
587
573
// Equal files
588
574
file .createNewFile ();
589
575
file2 .createNewFile ();
0 commit comments