mirror of https://github.com/apache/archiva.git
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:
parent
f5fff02859
commit
28a7a9cee8
|
@ -199,11 +199,12 @@ public class DefaultRepositoriesService
|
|||
ManagedRepository repository = managedRepositoryAdmin.getManagedRepository( repositoryId );
|
||||
|
||||
IndexingContext context = managedRepositoryAdmin.createIndexContext( repository );
|
||||
|
||||
ArtifactIndexingTask task =
|
||||
new ArtifactIndexingTask( repository, null, ArtifactIndexingTask.Action.FINISH, context );
|
||||
|
||||
task.setExecuteOnEntireRepo( fullScan );
|
||||
task.setOnlyUpdate( false );
|
||||
task.setExecuteOnEntireRepo( true );
|
||||
task.setOnlyUpdate( !fullScan );
|
||||
|
||||
archivaIndexingTaskExecutor.executeTask( task );
|
||||
return Boolean.TRUE;
|
||||
|
|
Loading…
Reference in New Issue