]> source.dussan.org Git - archiva.git/commitdiff
fix indexing call as could cause NPE
authorOlivier Lamy <olamy@apache.org>
Thu, 19 Jan 2012 22:39:00 +0000 (22:39 +0000)
committerOlivier Lamy <olamy@apache.org>
Thu, 19 Jan 2012 22:39:00 +0000 (22:39 +0000)
git-svn-id: https://svn.apache.org/repos/asf/archiva/trunk@1233615 13f79535-47bb-0310-9956-ffa450edef68

archiva-modules/archiva-web/archiva-rest/archiva-rest-services/src/main/java/org/apache/archiva/rest/services/DefaultRepositoriesService.java

index 91d9c7b83b6b1695aa6825f406e0cd39be7a3f7a..7c85aa08c23094f8f4d12e9d0d91a98f2a3ade73 100644 (file)
@@ -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;