lucene-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From uschind...@apache.org
Subject svn commit: r1366247 - /lucene/dev/trunk/solr/core/src/java/org/apache/solr/core/SolrResourceLoader.java
Date Fri, 27 Jul 2012 00:31:24 GMT
Author: uschindler
Date: Fri Jul 27 00:31:24 2012
New Revision: 1366247

URL: http://svn.apache.org/viewvc?rev=1366247&view=rev
Log:
LUCENE-4259: Improvement to expectedType

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

Modified: lucene/dev/trunk/solr/core/src/java/org/apache/solr/core/SolrResourceLoader.java
URL: http://svn.apache.org/viewvc/lucene/dev/trunk/solr/core/src/java/org/apache/solr/core/SolrResourceLoader.java?rev=1366247&r1=1366246&r2=1366247&view=diff
==============================================================================
--- lucene/dev/trunk/solr/core/src/java/org/apache/solr/core/SolrResourceLoader.java (original)
+++ lucene/dev/trunk/solr/core/src/java/org/apache/solr/core/SolrResourceLoader.java Fri Jul
27 00:31:24 2012
@@ -403,11 +403,11 @@ public class SolrResourceLoader implemen
       final String name = m.group(4);
       log.trace("Trying to load class from analysis SPI using name='{}'", name);
       try {
-        if (CharFilterFactory.class == expectedType) {
+        if (CharFilterFactory.class.isAssignableFrom(expectedType)) {
           return clazz = CharFilterFactory.lookupClass(name).asSubclass(expectedType);
-        } else if (TokenizerFactory.class == expectedType) {
+        } else if (TokenizerFactory.class.isAssignableFrom(expectedType)) {
           return clazz = TokenizerFactory.lookupClass(name).asSubclass(expectedType);
-        } else if (TokenFilterFactory.class == expectedType) {
+        } else if (TokenFilterFactory.class.isAssignableFrom(expectedType)) {
           return clazz = TokenFilterFactory.lookupClass(name).asSubclass(expectedType);
         } else {
           log.warn("'{}' looks like an analysis factory, but caller requested different class
type: {}", cname, expectedType.getName());



Mime
View raw message