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; OPEN_CV_LOADED = openCVLoadedTemp;
SUPPORTED_IMAGE_EXTENSIONS.addAll(Arrays.asList(ImageIO.getReaderFileSuffixes())); SUPPORTED_IMAGE_EXTENSIONS.addAll(Arrays.asList(ImageIO.getReaderFileSuffixes()));
SUPPORTED_IMAGE_EXTENSIONS.add("tec"); // Add JFIF .tec files 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())); SUPPORTED_IMAGE_MIME_TYPES = new TreeSet<>(Arrays.asList(ImageIO.getReaderMIMETypes()));
/* /*
* special cases and variants that we support, but don't get registered * special cases and variants that we support, but don't get registered

View File

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

View File

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