]> source.dussan.org Git - archiva.git/commitdiff
code simplification
authorOlivier Lamy <olamy@apache.org>
Wed, 6 Feb 2013 23:25:58 +0000 (23:25 +0000)
committerOlivier Lamy <olamy@apache.org>
Wed, 6 Feb 2013 23:25:58 +0000 (23:25 +0000)
git-svn-id: https://svn.apache.org/repos/asf/archiva/trunk@1443274 13f79535-47bb-0310-9956-ffa450edef68

archiva-modules/archiva-scheduler/archiva-scheduler-indexing/src/main/java/org/apache/archiva/scheduler/indexing/ArchivaIndexingTaskExecutor.java

index a5197dcf5a0269a4469806d26ef0d683a0caf9c2..f85582d99c071cf7102a1cb6d22e59619397fd8d 100644 (file)
@@ -242,16 +242,12 @@ public class ArchivaIndexingTaskExecutor
 
             if ( !repository.isSkipPackedIndexCreation() )
             {
-                File managedRepository = new File( repository.getLocation() );
-                String indexDirectory = repository.getIndexDirectory();
-                final File indexLocation = StringUtils.isBlank( indexDirectory )
-                    ? new File( managedRepository, ".indexer" )
-                    : new File( indexDirectory );
-                IndexPackingRequest request = new IndexPackingRequest( context, indexLocation );
+
+                IndexPackingRequest request = new IndexPackingRequest( context, context.getIndexDirectoryFile() );
                 indexPacker.packIndex( request );
                 context.updateTimestamp( true );
 
-                log.debug( "Index file packaged at '{}'.", indexLocation.getPath() );
+                log.debug( "Index file packaged at '{}'.", context.getIndexDirectoryFile() );
             }
             else
             {