]> source.dussan.org Git - archiva.git/commitdiff
use nio.Paths instead of io.File
authorEric Barboni <skygo@apache.org>
Mon, 17 Feb 2020 19:26:21 +0000 (20:26 +0100)
committerMartin <m.stockhammer@web.de>
Mon, 17 Feb 2020 21:49:18 +0000 (22:49 +0100)
archiva-modules/archiva-base/archiva-consumers/archiva-core-consumers/src/test/java/org/apache/archiva/consumers/core/repository/AbstractRepositoryPurgeTest.java

index 8dfcdb22d757f9e516ee477c6aa0cc2bedfca248..4632dbbae1e6e853307646315e86b5045f17c141 100644 (file)
@@ -19,7 +19,6 @@ package org.apache.archiva.consumers.core.repository;
  * under the License.
  */
 
-import java.io.File;
 import org.apache.archiva.metadata.model.ArtifactMetadata;
 import org.apache.archiva.metadata.repository.MetadataRepository;
 import org.apache.archiva.metadata.repository.RepositorySession;
@@ -164,8 +163,7 @@ public abstract class AbstractRepositoryPurgeTest
         atf.setRetentionPeriod( Period.ofDays( TEST_DAYS_OLDER) );
         String path = AbstractRepositoryPurgeTest.fixPath(
             basePath.resolve( repoId ).toAbsolutePath().toString() );
-        File file = new File( path );
-        config.setLocation( file.toURI() );
+        config.setLocation( Paths.get( path ).toFile().toURI() );
         atf.setDeleteReleasedSnapshots( true );
         atf.setRetentionCount( TEST_RETENTION_COUNT );