lucene-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From k...@apache.org
Subject svn commit: r1069656 - /lucene/dev/trunk/solr/src/java/org/apache/solr/core/SolrResourceLoader.java
Date Fri, 11 Feb 2011 01:29:02 GMT
Author: koji
Date: Fri Feb 11 01:29:01 2011
New Revision: 1069656

URL: http://svn.apache.org/viewvc?rev=1069656&view=rev
Log:
SOLR-1449: output error log in addToClassLoader(String,FileFilter), same as addToClassLoader(String)
does, when baseDir is not correct

Modified:
    lucene/dev/trunk/solr/src/java/org/apache/solr/core/SolrResourceLoader.java

Modified: lucene/dev/trunk/solr/src/java/org/apache/solr/core/SolrResourceLoader.java
URL: http://svn.apache.org/viewvc/lucene/dev/trunk/solr/src/java/org/apache/solr/core/SolrResourceLoader.java?rev=1069656&r1=1069655&r2=1069656&view=diff
==============================================================================
--- lucene/dev/trunk/solr/src/java/org/apache/solr/core/SolrResourceLoader.java (original)
+++ lucene/dev/trunk/solr/src/java/org/apache/solr/core/SolrResourceLoader.java Fri Feb 11
01:29:01 2011
@@ -131,7 +131,12 @@ public class SolrResourceLoader implemen
    */
   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);
+    }
   }
   
   /**



Mime
View raw message