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
|
@ -34,10 +34,9 @@ public abstract class BaseTokenFilterFactory implements TokenFilterFactory, Solr
|
||||||
/** The init args */
|
/** The init args */
|
||||||
protected Map<String,String> args;
|
protected Map<String,String> args;
|
||||||
|
|
||||||
|
|
||||||
@Deprecated
|
@Deprecated
|
||||||
public void init(Map<String,String> args) {
|
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;
|
this.args=args;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -45,6 +44,7 @@ public abstract class BaseTokenFilterFactory implements TokenFilterFactory, Solr
|
||||||
* @since solr 1.3
|
* @since solr 1.3
|
||||||
*/
|
*/
|
||||||
public void init(SolrConfig solrConfig, Map<String,String> args) {
|
public void init(SolrConfig solrConfig, Map<String,String> args) {
|
||||||
|
this.init( args ); // maintain backwards compatibility
|
||||||
this.args=args;
|
this.args=args;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -35,11 +35,12 @@ public abstract class BaseTokenizerFactory implements TokenizerFactory, SolrConf
|
||||||
|
|
||||||
@Deprecated
|
@Deprecated
|
||||||
public void init(Map<String,String> args) {
|
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;
|
this.args=args;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void init(SolrConfig solrConfig, Map<String,String> args) {
|
public void init(SolrConfig solrConfig, Map<String,String> args) {
|
||||||
|
this.init( args );
|
||||||
this.args=args;
|
this.args=args;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -632,7 +632,8 @@ public final class IndexSchema {
|
||||||
if (tfac instanceof SolrConfig.Initializable)
|
if (tfac instanceof SolrConfig.Initializable)
|
||||||
((SolrConfig.Initializable)tfac).init(solrConfig, DOMUtil.toMapExcept(attrs,"class"));
|
((SolrConfig.Initializable)tfac).init(solrConfig, DOMUtil.toMapExcept(attrs,"class"));
|
||||||
else
|
else
|
||||||
tfac.init(DOMUtil.toMapExcept(attrs,"class"));
|
tfac.init(DOMUtil.toMapExcept(attrs,"class"));
|
||||||
|
|
||||||
return tfac;
|
return tfac;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -645,7 +646,8 @@ public final class IndexSchema {
|
||||||
if (tfac instanceof SolrConfig.Initializable)
|
if (tfac instanceof SolrConfig.Initializable)
|
||||||
((SolrConfig.Initializable)tfac).init(solrConfig, DOMUtil.toMapExcept(attrs,"class"));
|
((SolrConfig.Initializable)tfac).init(solrConfig, DOMUtil.toMapExcept(attrs,"class"));
|
||||||
else
|
else
|
||||||
tfac.init(DOMUtil.toMapExcept(attrs,"class"));
|
tfac.init(DOMUtil.toMapExcept(attrs,"class"));
|
||||||
|
|
||||||
return tfac;
|
return tfac;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue