58
58
import org .codehaus .plexus .util .FileUtils ;
59
59
import org .codehaus .plexus .util .IOUtil ;
60
60
import org .codehaus .plexus .util .Os ;
61
+ import org .junit .Assert ;
61
62
import org .junit .Test ;
62
63
63
64
/**
@@ -527,19 +528,7 @@ public void testGzipFIleHandleLeak()
527
528
final File tarFile2 = tarHandler .createTarfile2 ( tarFile );
528
529
final TarFile cmp1 = tarHandler .newTarFile ( tarFile );
529
530
final TarFile cmp2 = new TarFile ( tarFile2 );
530
- ArchiveFileComparator .forEachTarArchiveEntry ( cmp1 , new ArchiveFileComparator .TarArchiveEntryConsumer ()
531
- {
532
-
533
- @ Override
534
- public void accept ( TarArchiveEntry ze1 )
535
- throws IOException
536
- {
537
- final String name1 = ze1 .getName ();
538
- assertNotNull ( name1 );
539
-
540
- }
541
-
542
- } );
531
+ ArchiveFileComparator .forEachTarArchiveEntry ( cmp1 , ze1 -> Assert .assertNotNull ( ze1 .getName () ) );
543
532
cmp1 .close ();
544
533
cmp2 .close ();
545
534
@@ -571,7 +560,7 @@ private void testCreateResourceCollection( TarHandler tarHandler )
571
560
final File tarFile2 = tarHandler .createTarfile2 ( tarFile );
572
561
final TarFile cmp1 = tarHandler .newTarFile ( tarFile );
573
562
final TarFile cmp2 = new TarFile ( tarFile2 );
574
- ArchiveFileComparator .assertEquals ( cmp1 , cmp2 , "prfx/" );
563
+ ArchiveFileComparator .assertTarEquals ( cmp1 , cmp2 , "prfx/" );
575
564
cmp1 .close ();
576
565
cmp2 .close ();
577
566
}
@@ -591,7 +580,7 @@ public void testSymlinkArchivedFileSet()
591
580
592
581
final TarFile cmp1 = new TarFile ( tarFile );
593
582
final TarFile cmp2 = new TarFile ( tarFile2 );
594
- ArchiveFileComparator .assertEquals ( cmp1 , cmp2 , "" );
583
+ ArchiveFileComparator .assertTarEquals ( cmp1 , cmp2 , "" );
595
584
}
596
585
597
586
}
0 commit comments