SOLR-4253: Misleading resource loading warning from Carrot2 clustering component fixed

git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1427755 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Stanisław Osiński 2013-01-02 12:06:49 +00:00
parent d03444f6e7
commit ed09a998b6
2 changed files with 5 additions and 4 deletions

View File

@ -426,6 +426,10 @@ Bug Fixes
* SOLR-4251: Fix SynonymFilterFactory when an optional tokenizerFactory is supplied.
(Chris Bleakley via rmuir)
* SOLR-4253: Misleading resource loading warning from Carrot2 clustering
component fixed (Stanisław Osiński)
Other Changes
----------------------

View File

@ -132,13 +132,10 @@ public class CarrotClusteringEngine extends SearchClusteringEngine {
try {
resourceStream = resourceLoader.openResource(resourceName);
asBytes = IOUtils.toByteArray(resourceStream);
} catch (RuntimeException e) {
} catch (IOException e) {
log.debug("Resource not found in Solr's config: " + resourceName
+ ". Using the default " + resource + " from Carrot JAR.");
return new IResource[] {};
} catch (IOException e) {
log.warn("Could not read Solr resource " + resourceName);
return new IResource[] {};
} finally {
if (resourceStream != null) Closeables.closeQuietly(resourceStream);
}