Browse Source

use nio.Paths instead of io.File

pull/59/head
Eric Barboni 4 years ago
parent
commit
c4da6e890f

+ 1
- 3
archiva-modules/archiva-base/archiva-consumers/archiva-core-consumers/src/test/java/org/apache/archiva/consumers/core/repository/AbstractRepositoryPurgeTest.java View File

* under the License. * under the License.
*/ */


import java.io.File;
import org.apache.archiva.metadata.model.ArtifactMetadata; import org.apache.archiva.metadata.model.ArtifactMetadata;
import org.apache.archiva.metadata.repository.MetadataRepository; import org.apache.archiva.metadata.repository.MetadataRepository;
import org.apache.archiva.metadata.repository.RepositorySession; import org.apache.archiva.metadata.repository.RepositorySession;
atf.setRetentionPeriod( Period.ofDays( TEST_DAYS_OLDER) ); atf.setRetentionPeriod( Period.ofDays( TEST_DAYS_OLDER) );
String path = AbstractRepositoryPurgeTest.fixPath( String path = AbstractRepositoryPurgeTest.fixPath(
basePath.resolve( repoId ).toAbsolutePath().toString() ); 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.setDeleteReleasedSnapshots( true );
atf.setRetentionCount( TEST_RETENTION_COUNT ); atf.setRetentionCount( TEST_RETENTION_COUNT );



Loading…
Cancel
Save