diff --git a/source/java/org/alfresco/repo/search/impl/lucene/fts/FTSIndexerAware.java b/source/java/org/alfresco/repo/search/impl/lucene/fts/FTSIndexerAware.java index eef29f508b..2041fdafcb 100644 --- a/source/java/org/alfresco/repo/search/impl/lucene/fts/FTSIndexerAware.java +++ b/source/java/org/alfresco/repo/search/impl/lucene/fts/FTSIndexerAware.java @@ -21,7 +21,7 @@ package org.alfresco.repo.search.impl.lucene.fts; import org.alfresco.service.cmr.repository.StoreRef; /** - * Supports acll back to the FTS indexer to report what has been done + * Supports callback to the FTS indexer to report what has been done * @author andyh * */ @@ -34,5 +34,5 @@ public interface FTSIndexerAware * @param remaining * @param e */ - public void indexCompleted(StoreRef storeRef, int remaining, Exception e); + public void indexCompleted(StoreRef storeRef, int remaining, Throwable t); } diff --git a/source/java/org/alfresco/repo/search/impl/lucene/fts/FullTextSearchIndexer.java b/source/java/org/alfresco/repo/search/impl/lucene/fts/FullTextSearchIndexer.java index fbc39b87f2..34ec0535e4 100644 --- a/source/java/org/alfresco/repo/search/impl/lucene/fts/FullTextSearchIndexer.java +++ b/source/java/org/alfresco/repo/search/impl/lucene/fts/FullTextSearchIndexer.java @@ -42,7 +42,7 @@ public interface FullTextSearchIndexer extends BeanFactoryAware * @param remaining * @param e */ - public abstract void indexCompleted(StoreRef storeRef, int remaining, Exception e); + public abstract void indexCompleted(StoreRef storeRef, int remaining, Throwable t); /** * Pause indexing 9no back ground indexing until a resume is called) diff --git a/source/java/org/alfresco/repo/search/impl/lucene/fts/FullTextSearchIndexerImpl.java b/source/java/org/alfresco/repo/search/impl/lucene/fts/FullTextSearchIndexerImpl.java index 43cbcae916..5331c2e2bd 100644 --- a/source/java/org/alfresco/repo/search/impl/lucene/fts/FullTextSearchIndexerImpl.java +++ b/source/java/org/alfresco/repo/search/impl/lucene/fts/FullTextSearchIndexerImpl.java @@ -43,7 +43,7 @@ import org.springframework.context.support.ClassPathXmlApplicationContext; * @author andyh * */ -public class FullTextSearchIndexerImpl implements FTSIndexerAware, FullTextSearchIndexer, DisposableBean +public class FullTextSearchIndexerImpl implements FullTextSearchIndexer, DisposableBean { private static Log s_logger = LogFactory.getLog(FullTextSearchIndexerImpl.class); @@ -89,7 +89,7 @@ public class FullTextSearchIndexerImpl implements FTSIndexerAware, FullTextSearc * * @see org.alfresco.repo.search.impl.lucene.fts.FullTextSearchIndexer#indexCompleted(org.alfresco.repo.ref.StoreRef, int, java.lang.Exception) */ - public synchronized void indexCompleted(StoreRef storeRef, int remaining, Exception e) + public synchronized void indexCompleted(StoreRef storeRef, int remaining, Throwable t) { try { @@ -98,13 +98,13 @@ public class FullTextSearchIndexerImpl implements FTSIndexerAware, FullTextSearc s_logger.debug("FTS index completed for "+storeRef+" ... "+remaining+ " remaining"); } indexing.remove(storeRef); - if ((remaining > 0) || (e != null)) + if ((remaining > 0) || (t != null)) { requiresIndex(storeRef); } - if (e != null) + if (t != null) { - throw new FTSIndexerException(e); + throw new FTSIndexerException(t); } } finally @@ -253,9 +253,9 @@ public class FullTextSearchIndexerImpl implements FTSIndexerAware, FullTextSearc break; } } - finally + catch(Throwable t) { - indexCompleted(toIndex, 1, null); + indexCompleted(toIndex, 0, t); } } }