SOLR-1449: output error log in addToClassLoader(String,FileFilter), same as addToClassLoader(String) does, when baseDir is not correct

git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1069656 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Koji Sekiguchi 2011-02-11 01:29:01 +00:00
parent 224d7b4ed6
commit 7972ac83ad
1 changed files with 6 additions and 1 deletions

View File

@ -131,7 +131,12 @@ public class SolrResourceLoader implements ResourceLoader
*/
void addToClassLoader(final String baseDir, final FileFilter filter) {
File base = FileUtils.resolvePath(new File(getInstanceDir()), baseDir);
this.classLoader = replaceClassLoader(classLoader, base, filter);
if(base != null && base.canRead() && base.isDirectory()){
this.classLoader = replaceClassLoader(classLoader, base, filter);
}
else{
log.error("Can't find (or read) file to add to classloader: " + base);
}
}
/**