fix indexing call as could cause NPE

git-svn-id: https://svn.apache.org/repos/asf/archiva/trunk@1233615 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Olivier Lamy 2012-01-19 22:39:00 +00:00
parent f5fff02859
commit 28a7a9cee8
1 changed files with 3 additions and 2 deletions

View File

@ -199,11 +199,12 @@ public class DefaultRepositoriesService
ManagedRepository repository = managedRepositoryAdmin.getManagedRepository( repositoryId ); ManagedRepository repository = managedRepositoryAdmin.getManagedRepository( repositoryId );
IndexingContext context = managedRepositoryAdmin.createIndexContext( repository ); IndexingContext context = managedRepositoryAdmin.createIndexContext( repository );
ArtifactIndexingTask task = ArtifactIndexingTask task =
new ArtifactIndexingTask( repository, null, ArtifactIndexingTask.Action.FINISH, context ); new ArtifactIndexingTask( repository, null, ArtifactIndexingTask.Action.FINISH, context );
task.setExecuteOnEntireRepo( fullScan ); task.setExecuteOnEntireRepo( true );
task.setOnlyUpdate( false ); task.setOnlyUpdate( !fullScan );
archivaIndexingTaskExecutor.executeTask( task ); archivaIndexingTaskExecutor.executeTask( task );
return Boolean.TRUE; return Boolean.TRUE;