formatting only

git-svn-id: https://svn.apache.org/repos/asf/archiva/branches/MRM-1025@885816 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Brett Porter 2009-12-01 16:17:08 +00:00
parent 52bcd1b58b
commit cfabf95ff6
1 changed files with 21 additions and 20 deletions

View File

@ -292,8 +292,7 @@ public class UploadAction
try try
{ {
Configuration config = configuration.getConfiguration(); Configuration config = configuration.getConfiguration();
ManagedRepositoryConfiguration repoConfig = ManagedRepositoryConfiguration repoConfig = config.findManagedRepositoryById( repositoryId );
config.findManagedRepositoryById( repositoryId );
ArtifactReference artifactReference = new ArtifactReference(); ArtifactReference artifactReference = new ArtifactReference();
artifactReference.setArtifactId( artifactId ); artifactReference.setArtifactId( artifactId );
@ -345,14 +344,16 @@ public class UploadAction
filename = filename.replaceAll( "SNAPSHOT", timestamp + "-" + newBuildNumber ); filename = filename.replaceAll( "SNAPSHOT", timestamp + "-" + newBuildNumber );
} }
boolean fixChecksums = !( config.getRepositoryScanning().getKnownContentConsumers().contains( "create-missing-checksums" ) ); boolean fixChecksums =
!( config.getRepositoryScanning().getKnownContentConsumers().contains( "create-missing-checksums" ) );
try try
{ {
File targetFile = new File( targetPath, filename ); File targetFile = new File( targetPath, filename );
if ( targetFile.exists() && !VersionUtil.isSnapshot( version ) && repoConfig.isBlockRedeployments() ) if ( targetFile.exists() && !VersionUtil.isSnapshot( version ) && repoConfig.isBlockRedeployments() )
{ {
addActionError( "Overwriting released artifacts in repository '" + repoConfig.getId() + "' is not allowed." ); addActionError(
"Overwriting released artifacts in repository '" + repoConfig.getId() + "' is not allowed." );
return ERROR; return ERROR;
} }
else else