lucene-solr-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From r...@apache.org
Subject svn commit: r584316 - in /lucene/solr/trunk/src/java/org/apache/solr: analysis/BaseTokenFilterFactory.java analysis/BaseTokenizerFactory.java schema/IndexSchema.java
Date Fri, 12 Oct 2007 23:14:08 GMT
Author: ryan
Date: Fri Oct 12 16:14:07 2007
New Revision: 584316

URL: http://svn.apache.org/viewvc?rev=584316&view=rev
Log:
SOLR-215 -- make sure that BaseTokenFilterFactory/BaseTokenizerFactory call the @Deprecated
init() method

Modified:
    lucene/solr/trunk/src/java/org/apache/solr/analysis/BaseTokenFilterFactory.java
    lucene/solr/trunk/src/java/org/apache/solr/analysis/BaseTokenizerFactory.java
    lucene/solr/trunk/src/java/org/apache/solr/schema/IndexSchema.java

Modified: lucene/solr/trunk/src/java/org/apache/solr/analysis/BaseTokenFilterFactory.java
URL: http://svn.apache.org/viewvc/lucene/solr/trunk/src/java/org/apache/solr/analysis/BaseTokenFilterFactory.java?rev=584316&r1=584315&r2=584316&view=diff
==============================================================================
--- lucene/solr/trunk/src/java/org/apache/solr/analysis/BaseTokenFilterFactory.java (original)
+++ lucene/solr/trunk/src/java/org/apache/solr/analysis/BaseTokenFilterFactory.java Fri Oct
12 16:14:07 2007
@@ -34,10 +34,9 @@
   /** The init args */
   protected Map<String,String> args;
   
-
+  
   @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 @@
    * @since solr 1.3
    */
   public void init(SolrConfig solrConfig, Map<String,String> args) {
+    this.init( args );  // maintain backwards compatibility
     this.args=args;
   }
 

Modified: lucene/solr/trunk/src/java/org/apache/solr/analysis/BaseTokenizerFactory.java
URL: http://svn.apache.org/viewvc/lucene/solr/trunk/src/java/org/apache/solr/analysis/BaseTokenizerFactory.java?rev=584316&r1=584315&r2=584316&view=diff
==============================================================================
--- lucene/solr/trunk/src/java/org/apache/solr/analysis/BaseTokenizerFactory.java (original)
+++ lucene/solr/trunk/src/java/org/apache/solr/analysis/BaseTokenizerFactory.java Fri Oct
12 16:14:07 2007
@@ -35,11 +35,12 @@
   
   @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;
   }
   

Modified: lucene/solr/trunk/src/java/org/apache/solr/schema/IndexSchema.java
URL: http://svn.apache.org/viewvc/lucene/solr/trunk/src/java/org/apache/solr/schema/IndexSchema.java?rev=584316&r1=584315&r2=584316&view=diff
==============================================================================
--- lucene/solr/trunk/src/java/org/apache/solr/schema/IndexSchema.java (original)
+++ lucene/solr/trunk/src/java/org/apache/solr/schema/IndexSchema.java Fri Oct 12 16:14:07
2007
@@ -632,7 +632,8 @@
     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 @@
     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;
   }
 



Mime
View raw message