Milos Kleint created MINDEXER-63:
------------------------------------

             Summary: NullPointerException at 
org.apache.maven.index.context.DefaultIndexingContext.acquireIndexSearcher
                 Key: MINDEXER-63
                 URL: https://jira.codehaus.org/browse/MINDEXER-63
             Project: Maven Indexer
          Issue Type: Bug
    Affects Versions: 5.0.0
         Environment: netbeans 7.3 dev builds.
            Reporter: Milos Kleint
            Priority: Critical


see issue http://netbeans.org/bugzilla/show_bug.cgi?id=219645

for some reason (unknown to me yet) the index files cannot be deleted. The 
codebase then gets into bad state.

possibly wrong code in DefaultIndexingContext:

public synchronized void replace( Directory directory )
        throws IOException
    {
        final Date ts = IndexUtils.getTimestamp( directory );
        closeReaders();
        deleteIndexFiles( false );
        IndexUtils.copyDirectory( directory, indexDirectory );
        openAndWarmup();
        // reclaim the index as mine
        storeDescriptor();
        updateTimestamp( true, ts );
        optimize();
    }

when deleteIndexFiles(0 fails, openAndWarmup() is not called. also 
closeReaders() ignores indexWriter..

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://jira.codehaus.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira


Reply via email to