Merge branch 'develop' of https://github.com/sleuthkit/autopsy into kws_list_fix

This commit is contained in:
Eugene Livis 2017-03-29 16:16:41 -04:00
commit a3e4195f66
3 changed files with 10 additions and 9 deletions

View File

@ -137,6 +137,8 @@ public class ImageUtils {
OPEN_CV_LOADED = openCVLoadedTemp;
SUPPORTED_IMAGE_EXTENSIONS.addAll(Arrays.asList(ImageIO.getReaderFileSuffixes()));
SUPPORTED_IMAGE_EXTENSIONS.add("tec"); // Add JFIF .tec files
SUPPORTED_IMAGE_EXTENSIONS.removeIf("db"::equals); // remove db files
SUPPORTED_IMAGE_MIME_TYPES = new TreeSet<>(Arrays.asList(ImageIO.getReaderMIMETypes()));
/*
* special cases and variants that we support, but don't get registered

View File

@ -565,7 +565,7 @@ public class Server {
try {
// Close any open core before stopping server
closeCore();
} catch (KeywordSearchModuleException | NoOpenCoreException e) {
} catch (KeywordSearchModuleException e) {
logger.log(Level.WARNING, "Failed to close core: ", e); //NON-NLS
}
@ -704,15 +704,14 @@ public class Server {
}
}
void closeCore() throws KeywordSearchModuleException, NoOpenCoreException {
void closeCore() throws KeywordSearchModuleException {
currentCoreLock.writeLock().lock();
try {
if (null == currentCore) {
throw new NoOpenCoreException();
if (null != currentCore) {
currentCore.close();
currentCore = null;
serverAction.putValue(CORE_EVT, CORE_EVT_STATES.STOPPED);
}
currentCore.close();
currentCore = null;
serverAction.putValue(CORE_EVT, CORE_EVT_STATES.STOPPED);
} finally {
currentCoreLock.writeLock().unlock();
}
@ -760,7 +759,7 @@ public class Server {
closeCore();
}
}
} catch (KeywordSearchModuleException | NoOpenCoreException ex) {
} catch (KeywordSearchModuleException ex) {
throw new KeywordSearchServiceException(NbBundle.getMessage(Server.class, "Server.close.exception.msg"), ex);
} finally {
currentCoreLock.readLock().unlock();

View File

@ -375,7 +375,7 @@ public class SolrSearchService implements KeywordSearchService, AutopsyService {
try {
KeywordSearch.getServer().closeCore();
} catch (KeywordSearchModuleException | NoOpenCoreException ex) {
} catch (KeywordSearchModuleException ex) {
throw new AutopsyServiceException(String.format("Failed to close core for %s", context.getCase().getCaseDirectory()), ex);
}
}