[ https://jira.codehaus.org/browse/MINDEXER-63?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Milos Kleint updated MINDEXER-63: --------------------------------- Description: 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: {code:java} 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(); àà} {code} when deleteIndexFiles(0 fails, openAndWarmup() is not called. also closeReaders() ignores indexWriter.. was: 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.. > 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: > {code:java} > 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(); > àà} > {code} > 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