mirror of
https://github.com/apache/archiva.git
synced 2025-02-06 10:09:32 +00:00
Remove Sonar Dead Store Issues.
This commit is contained in:
parent
5d5b0733de
commit
495a7bf95f
@ -97,14 +97,12 @@ public void triggerFinished()
|
||||
|
||||
public void increaseFileCount()
|
||||
{
|
||||
long count = getTotalFileCount();
|
||||
this.totalFileCount = ++count;
|
||||
this.totalFileCount += 1;
|
||||
}
|
||||
|
||||
public void increaseNewFileCount()
|
||||
{
|
||||
long count = getNewFileCount();
|
||||
this.newFileCount = ++count;
|
||||
this.newFileCount += 1;
|
||||
}
|
||||
|
||||
public void setKnownConsumers( List<String> consumers )
|
||||
|
@ -423,7 +423,7 @@ public Boolean copyArtifact( ArtifactTransferRequest artifactTransferRequest )
|
||||
String timestamp = null;
|
||||
|
||||
File versionMetadataFile = new File( targetPath, MetadataTools.MAVEN_METADATA );
|
||||
ArchivaRepositoryMetadata versionMetadata = getMetadata( versionMetadataFile );
|
||||
/* unused */ getMetadata( versionMetadataFile );
|
||||
|
||||
if ( !targetPath.exists() )
|
||||
{
|
||||
@ -482,6 +482,7 @@ public Boolean copyArtifact( ArtifactTransferRequest artifactTransferRequest )
|
||||
"Artifact \'" + artifactTransferRequest.getGroupId() + ":" + artifactTransferRequest.getArtifactId()
|
||||
+ ":" + artifactTransferRequest.getVersion() + "\' was successfully deployed to repository \'"
|
||||
+ artifactTransferRequest.getTargetRepositoryId() + "\'";
|
||||
log.debug("copyArtifact {}", msg);
|
||||
|
||||
}
|
||||
catch ( RepositoryException e )
|
||||
|
@ -189,7 +189,7 @@ public Boolean deleteFile( String fileName )
|
||||
// try with full name as ui only know the file name
|
||||
if ( !removed )
|
||||
{
|
||||
removed = getSessionFileMetadatas().remove( new FileMetadata( file.getPath() ) );
|
||||
/* unused */ getSessionFileMetadatas().remove( new FileMetadata( file.getPath() ) );
|
||||
}
|
||||
if ( file.exists() )
|
||||
{
|
||||
|
@ -280,12 +280,8 @@ private RepositorySystemSession newRepositorySystemSession( RepositorySystem sys
|
||||
DependencySelector depFilter = new AndDependencySelector( new ExclusionDependencySelector() );
|
||||
session.setDependencySelector( depFilter );
|
||||
|
||||
LocalRepository localRepo = new LocalRepository( localRepoDir );
|
||||
session.setLocalRepositoryManager(
|
||||
new SimpleLocalRepositoryManager( localRepoDir ) );// system.newLocalRepositoryManager( localRepo ) );
|
||||
|
||||
//session.setTransferListener( );
|
||||
//session.setRepositoryListener( n );
|
||||
new SimpleLocalRepositoryManager( localRepoDir ) );
|
||||
|
||||
return session;
|
||||
}
|
||||
|
@ -193,9 +193,6 @@ private void createFolderStructure( String sourceRepoId, String targetRepoId, Ar
|
||||
// artifact copying
|
||||
copyFile( sourceArtifactFile, targetArtifactFile );
|
||||
|
||||
// pom file copying
|
||||
String fileName = artifactMetadata.getProject() + "-" + artifactMetadata.getVersion() + ".pom";
|
||||
|
||||
// pom file copying
|
||||
// TODO need to use path translator to get the pom file path
|
||||
// String fileName = artifactMetadata.getProject() + "-" + artifactMetadata.getVersion() + ".pom";
|
||||
|
Loading…
x
Reference in New Issue
Block a user