diff options
author | Martin Stockhammer <martin_s@apache.org> | 2017-09-02 22:05:16 +0200 |
---|---|---|
committer | Martin Stockhammer <martin_s@apache.org> | 2017-09-02 22:05:16 +0200 |
commit | cd1f4a9e79c91e11f1183045b6aeb8b93017d319 (patch) | |
tree | 745f871efcfa13f33203008bfe79da69578eb9e3 /archiva-modules/archiva-web/archiva-rest | |
parent | faceef262c3521c1f27bfc49c7ab74c1b41a57ec (diff) | |
download | archiva-cd1f4a9e79c91e11f1183045b6aeb8b93017d319.tar.gz archiva-cd1f4a9e79c91e11f1183045b6aeb8b93017d319.zip |
Switching the checksum module to java.nio
Diffstat (limited to 'archiva-modules/archiva-web/archiva-rest')
3 files changed, 4 insertions, 7 deletions
diff --git a/archiva-modules/archiva-web/archiva-rest/archiva-rest-services/src/main/java/org/apache/archiva/rest/services/DefaultRepositoriesService.java b/archiva-modules/archiva-web/archiva-rest/archiva-rest-services/src/main/java/org/apache/archiva/rest/services/DefaultRepositoriesService.java index 629a44d6c..1f0fd73cb 100644 --- a/archiva-modules/archiva-web/archiva-rest/archiva-rest-services/src/main/java/org/apache/archiva/rest/services/DefaultRepositoriesService.java +++ b/archiva-modules/archiva-web/archiva-rest/archiva-rest-services/src/main/java/org/apache/archiva/rest/services/DefaultRepositoriesService.java @@ -557,7 +557,7 @@ public class DefaultRepositoriesService private void fixChecksums( File file ) { - ChecksummedFile checksum = new ChecksummedFile( file ); + ChecksummedFile checksum = new ChecksummedFile( file.toPath() ); checksum.fixChecksums( algorithms ); } @@ -1188,7 +1188,7 @@ public class DefaultRepositoriesService metadata.setAvailableVersions( availableVersions ); RepositoryMetadataWriter.write( metadata, metadataFile.toPath() ); - ChecksummedFile checksum = new ChecksummedFile( metadataFile ); + ChecksummedFile checksum = new ChecksummedFile( metadataFile.toPath() ); checksum.fixChecksums( algorithms ); } diff --git a/archiva-modules/archiva-web/archiva-rest/archiva-rest-services/src/test/java/org/apache/archiva/rest/services/AbstractArchivaRestTest.java b/archiva-modules/archiva-web/archiva-rest/archiva-rest-services/src/test/java/org/apache/archiva/rest/services/AbstractArchivaRestTest.java index bc1b545ab..cce73ba2b 100644 --- a/archiva-modules/archiva-web/archiva-rest/archiva-rest-services/src/test/java/org/apache/archiva/rest/services/AbstractArchivaRestTest.java +++ b/archiva-modules/archiva-web/archiva-rest/archiva-rest-services/src/test/java/org/apache/archiva/rest/services/AbstractArchivaRestTest.java @@ -21,7 +21,6 @@ package org.apache.archiva.rest.services; import com.fasterxml.jackson.jaxrs.json.JacksonJaxbJsonProvider; import org.apache.archiva.admin.model.beans.ManagedRepository; -import org.apache.archiva.common.utils.FileUtil; import org.apache.archiva.redback.rest.api.services.RedbackServiceException; import org.apache.archiva.redback.rest.services.AbstractRestServicesTest; import org.apache.archiva.rest.api.services.ArchivaAdministrationService; @@ -45,7 +44,6 @@ import org.apache.commons.io.FileUtils; import org.apache.commons.lang.StringUtils; import org.apache.cxf.jaxrs.client.JAXRSClientFactory; import org.apache.cxf.jaxrs.client.WebClient; -import org.junit.After; import org.junit.Assume; import org.junit.Before; import org.junit.BeforeClass; @@ -334,7 +332,7 @@ public abstract class AbstractArchivaRestTest protected ManagedRepository getTestManagedRepository() { - String location = new File( FileUtil.getBasedir(), "target/test-repo" ).getAbsolutePath(); + String location = new File( org.apache.archiva.common.utils.FileUtils.getBasedir(), "target/test-repo" ).getAbsolutePath(); return new ManagedRepository( "TEST", "test", location, "default", true, true, false, "2 * * * * ?", null, false, 2, 3, true, false, "my nice repo", false ); diff --git a/archiva-modules/archiva-web/archiva-rest/archiva-rest-services/src/test/java/org/apache/archiva/rest/services/RepositoriesServiceTest.java b/archiva-modules/archiva-web/archiva-rest/archiva-rest-services/src/test/java/org/apache/archiva/rest/services/RepositoriesServiceTest.java index f745c043d..aab1ea962 100644 --- a/archiva-modules/archiva-web/archiva-rest/archiva-rest-services/src/test/java/org/apache/archiva/rest/services/RepositoriesServiceTest.java +++ b/archiva-modules/archiva-web/archiva-rest/archiva-rest-services/src/test/java/org/apache/archiva/rest/services/RepositoriesServiceTest.java @@ -20,7 +20,6 @@ package org.apache.archiva.rest.services; */ import org.apache.archiva.admin.model.beans.ManagedRepository; -import org.apache.archiva.common.utils.FileUtil; import org.apache.archiva.maven2.model.Artifact; import org.apache.archiva.rest.api.model.BrowseResult; import org.apache.archiva.rest.api.model.BrowseResultEntry; @@ -542,7 +541,7 @@ public class RepositoriesServiceTest protected ManagedRepository getTestManagedRepository( String id, String path ) { - String location = new File( FileUtil.getBasedir(), "target/" + path ).getAbsolutePath(); + String location = new File( org.apache.archiva.common.utils.FileUtils.getBasedir(), "target/" + path ).getAbsolutePath(); return new ManagedRepository( id, id, location, "default", true, true, true, "2 * * * * ?", null, false, 80, 80, true, false ); } |