mirror of https://github.com/apache/lucene.git
SOLR-215 -- make sure that BaseTokenFilterFactory/BaseTokenizerFactory call the @Deprecated init() method
git-svn-id: https://svn.apache.org/repos/asf/lucene/solr/trunk@584316 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
d36587fac6
commit
f1c3211c3d
|
@ -37,7 +37,6 @@ public abstract class BaseTokenFilterFactory implements TokenFilterFactory, Solr
|
|||
|
||||
@Deprecated
|
||||
public void init(Map<String,String> args) {
|
||||
log.warning("calling the deprecated form of init; should be calling init(SolrConfig solrConfig, Map<String,String> args)");
|
||||
this.args=args;
|
||||
}
|
||||
|
||||
|
@ -45,6 +44,7 @@ public abstract class BaseTokenFilterFactory implements TokenFilterFactory, Solr
|
|||
* @since solr 1.3
|
||||
*/
|
||||
public void init(SolrConfig solrConfig, Map<String,String> args) {
|
||||
this.init( args ); // maintain backwards compatibility
|
||||
this.args=args;
|
||||
}
|
||||
|
||||
|
|
|
@ -35,11 +35,12 @@ public abstract class BaseTokenizerFactory implements TokenizerFactory, SolrConf
|
|||
|
||||
@Deprecated
|
||||
public void init(Map<String,String> args) {
|
||||
log.warning("calling the deprecated form of init; should be calling init(SolrConfig solrConfig, Map<String,String> args)");
|
||||
//log.warning("calling the deprecated form of init; should be calling init(SolrConfig solrConfig, Map<String,String> args)");
|
||||
this.args=args;
|
||||
}
|
||||
|
||||
public void init(SolrConfig solrConfig, Map<String,String> args) {
|
||||
this.init( args );
|
||||
this.args=args;
|
||||
}
|
||||
|
||||
|
|
|
@ -632,7 +632,8 @@ public final class IndexSchema {
|
|||
if (tfac instanceof SolrConfig.Initializable)
|
||||
((SolrConfig.Initializable)tfac).init(solrConfig, DOMUtil.toMapExcept(attrs,"class"));
|
||||
else
|
||||
tfac.init(DOMUtil.toMapExcept(attrs,"class"));
|
||||
tfac.init(DOMUtil.toMapExcept(attrs,"class"));
|
||||
|
||||
return tfac;
|
||||
}
|
||||
|
||||
|
@ -645,7 +646,8 @@ public final class IndexSchema {
|
|||
if (tfac instanceof SolrConfig.Initializable)
|
||||
((SolrConfig.Initializable)tfac).init(solrConfig, DOMUtil.toMapExcept(attrs,"class"));
|
||||
else
|
||||
tfac.init(DOMUtil.toMapExcept(attrs,"class"));
|
||||
tfac.init(DOMUtil.toMapExcept(attrs,"class"));
|
||||
|
||||
return tfac;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue