summaryrefslogtreecommitdiffstats
path: root/archiva-modules/archiva-base/archiva-consumers/archiva-core-consumers
diff options
context:
space:
mode:
authorOlivier Lamy <olamy@apache.org>2015-03-23 15:00:51 +1100
committerOlivier Lamy <olamy@apache.org>2015-03-23 15:00:51 +1100
commit6317bd9d026d6e8691e88e1a81c6d5a6ae456f80 (patch)
tree70b5d4cb88eb9c0cda288d130f27afecf0f9025b /archiva-modules/archiva-base/archiva-consumers/archiva-core-consumers
parenta6c73dcde2a11d763a576edff292f9361a2fdb16 (diff)
downloadarchiva-6317bd9d026d6e8691e88e1a81c6d5a6ae456f80.tar.gz
archiva-6317bd9d026d6e8691e88e1a81c6d5a6ae456f80.zip
add unit test for [MRM-1877]
Diffstat (limited to 'archiva-modules/archiva-base/archiva-consumers/archiva-core-consumers')
-rw-r--r--archiva-modules/archiva-base/archiva-consumers/archiva-core-consumers/src/main/java/org/apache/archiva/consumers/core/ArtifactMissingChecksumsConsumer.java12
1 files changed, 5 insertions, 7 deletions
diff --git a/archiva-modules/archiva-base/archiva-consumers/archiva-core-consumers/src/main/java/org/apache/archiva/consumers/core/ArtifactMissingChecksumsConsumer.java b/archiva-modules/archiva-base/archiva-consumers/archiva-core-consumers/src/main/java/org/apache/archiva/consumers/core/ArtifactMissingChecksumsConsumer.java
index 9b5510ca2..ebb5997b9 100644
--- a/archiva-modules/archiva-base/archiva-consumers/archiva-core-consumers/src/main/java/org/apache/archiva/consumers/core/ArtifactMissingChecksumsConsumer.java
+++ b/archiva-modules/archiva-base/archiva-consumers/archiva-core-consumers/src/main/java/org/apache/archiva/consumers/core/ArtifactMissingChecksumsConsumer.java
@@ -27,10 +27,10 @@ import org.apache.archiva.configuration.FileTypes;
import org.apache.archiva.consumers.AbstractMonitoredConsumer;
import org.apache.archiva.consumers.ConsumerException;
import org.apache.archiva.consumers.KnownRepositoryContentConsumer;
-import org.springframework.context.annotation.Scope;
-import org.springframework.stereotype.Service;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
+import org.springframework.context.annotation.Scope;
+import org.springframework.stereotype.Service;
import javax.annotation.PostConstruct;
import javax.inject.Inject;
@@ -42,8 +42,6 @@ import java.util.List;
/**
* ArtifactMissingChecksumsConsumer - Create missing and/or fix invalid checksums for the artifact.
- *
- *
*/
@Service( "knownRepositoryContentConsumer#create-missing-checksums" )
@Scope( "prototype" )
@@ -98,7 +96,7 @@ public class ArtifactMissingChecksumsConsumer
{
return this.description;
}
-
+
@Override
public void beginScan( ManagedRepository repo, Date whenGathered )
throws ConsumerException
@@ -155,7 +153,7 @@ public class ArtifactMissingChecksumsConsumer
private void createFixChecksum( String path, ChecksumAlgorithm checksumAlgorithm )
{
File artifactFile = new File( this.repositoryDir, path );
- File checksumFile = new File( this.repositoryDir, path + checksumAlgorithm.getExt() );//+ "."
+ File checksumFile = new File( this.repositoryDir, path + "." + checksumAlgorithm.getExt() );
if ( checksumFile.exists() )
{
@@ -182,7 +180,7 @@ public class ArtifactMissingChecksumsConsumer
try
{
checksum.createChecksum( checksumAlgorithm );
- log.info( "Created missing checksum file {}", checksumFile.getAbsolutePath() );
+ log.info( "Created missing checksum file {}", checksumFile.getAbsolutePath() );
triggerConsumerInfo( "Created missing checksum file " + checksumFile.getAbsolutePath() );
}
catch ( IOException e )