You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucene.apache.org by ho...@apache.org on 2018/05/21 23:18:32 UTC

lucene-solr:master: SOLR-9480 followup: remove/abstract deprecated implementations on master

Repository: lucene-solr
Updated Branches:
  refs/heads/master 2ce53791d -> 0bf1eae92


SOLR-9480 followup: remove/abstract deprecated implementations on master


Project: http://git-wip-us.apache.org/repos/asf/lucene-solr/repo
Commit: http://git-wip-us.apache.org/repos/asf/lucene-solr/commit/0bf1eae9
Tree: http://git-wip-us.apache.org/repos/asf/lucene-solr/tree/0bf1eae9
Diff: http://git-wip-us.apache.org/repos/asf/lucene-solr/diff/0bf1eae9

Branch: refs/heads/master
Commit: 0bf1eae92c4117659e2608111a8d64294009cc98
Parents: 2ce5379
Author: Chris Hostetter <ho...@apache.org>
Authored: Mon May 21 16:18:27 2018 -0700
Committer: Chris Hostetter <ho...@apache.org>
Committed: Mon May 21 16:18:27 2018 -0700

----------------------------------------------------------------------
 .../org/apache/solr/search/facet/SlotAcc.java   | 22 ++++----------------
 1 file changed, 4 insertions(+), 18 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/0bf1eae9/solr/core/src/java/org/apache/solr/search/facet/SlotAcc.java
----------------------------------------------------------------------
diff --git a/solr/core/src/java/org/apache/solr/search/facet/SlotAcc.java b/solr/core/src/java/org/apache/solr/search/facet/SlotAcc.java
index 9c12aff..244485e 100644
--- a/solr/core/src/java/org/apache/solr/search/facet/SlotAcc.java
+++ b/solr/core/src/java/org/apache/solr/search/facet/SlotAcc.java
@@ -68,20 +68,9 @@ public abstract class SlotAcc implements Closeable {
   }
 
   /**
-   * @deprecated This method exists only for backcompatibility, developers of new {@link SlotAcc} 
-   * implementations should not implement this method, and should instead override 
-   * {@link #collect(int,int,IntFunction)}
-   */
-  @Deprecated
-  public void collect(int doc, int slot) throws IOException {
-    throw new UnsupportedOperationException
-      ("SlotAcc implementations must implement 'collect(int,int,IntFunction<SlotContext>)' or the (deprecated)"
-      + "'collect(int,int)'");
-  }
-  
-  /**
-   * All subclasses should override this method, for backcompatability the default implementaion
-   * delegates to the (deprecated) {@link #collect(int,int)}
+   * All subclasses must override this method to collect documents.  This method is called by the 
+   * default impl of {@link #collect(DocSet,int,IntFunction)} but it's also neccessary if this accumulator 
+   * is used for sorting.
    *
    * @param doc Single Segment docId (relative to the current {@link LeafReaderContext} to collect
    * @param slot The slot number to collect this document in
@@ -90,10 +79,7 @@ public abstract class SlotAcc implements Closeable {
    *        the current slot, and the {@link SlotContext} returned is only valid for the duration 
    *        of the <code>collect()</code> call.
    */
-  @Deprecated
-  public void collect(int doc, int slot, IntFunction<SlotContext> slotContext) throws IOException {
-    collect(doc,slot);
-  }
+  public abstract void collect(int doc, int slot, IntFunction<SlotContext> slotContext) throws IOException;
 
   /**
    * Bulk collection of all documents in a slot.  The default implementation calls {@link #collect(int,int,IntFunction)}