lucene-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From romseyg...@apache.org
Subject [1/2] lucene-solr:master: LUCENE-8388: Remove PostingsEnum#attributes()
Date Fri, 06 Jul 2018 17:16:47 GMT
Repository: lucene-solr
Updated Branches:
  refs/heads/branch_7x b3896b4eb -> 9a6706ed3
  refs/heads/master 7d8ef9e39 -> 6d6e67140


LUCENE-8388: Remove PostingsEnum#attributes()


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

Branch: refs/heads/master
Commit: 6d6e67140b44dfb45bd8aadc58e3b8bfb79f5016
Parents: 7d8ef9e
Author: Alan Woodward <romseygeek@apache.org>
Authored: Fri Jul 6 17:59:18 2018 +0100
Committer: Alan Woodward <romseygeek@apache.org>
Committed: Fri Jul 6 18:16:09 2018 +0100

----------------------------------------------------------------------
 lucene/CHANGES.txt                                          | 3 +++
 .../src/java/org/apache/lucene/index/FilterLeafReader.java  | 5 -----
 .../core/src/java/org/apache/lucene/index/PostingsEnum.java | 9 ---------
 3 files changed, 3 insertions(+), 14 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/6d6e6714/lucene/CHANGES.txt
----------------------------------------------------------------------
diff --git a/lucene/CHANGES.txt b/lucene/CHANGES.txt
index 53c19d5..a526ae4 100644
--- a/lucene/CHANGES.txt
+++ b/lucene/CHANGES.txt
@@ -53,6 +53,9 @@ API Changes
 * LUCENE-8373: StandardAnalyzer.ENGLISH_STOP_WORD_SET has been removed
   (Alan Woodward)
 
+* LUCENE-8388: Unused PostingsEnum#attributes() method has been removed 
+  (Alan Woodward)
+
 Changes in Runtime Behavior
 
 * LUCENE-8333: Switch MoreLikeThis.setMaxDocFreqPct to use maxDoc instead of

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/6d6e6714/lucene/core/src/java/org/apache/lucene/index/FilterLeafReader.java
----------------------------------------------------------------------
diff --git a/lucene/core/src/java/org/apache/lucene/index/FilterLeafReader.java b/lucene/core/src/java/org/apache/lucene/index/FilterLeafReader.java
index 3d86bee..8e1f272 100644
--- a/lucene/core/src/java/org/apache/lucene/index/FilterLeafReader.java
+++ b/lucene/core/src/java/org/apache/lucene/index/FilterLeafReader.java
@@ -237,11 +237,6 @@ public abstract class FilterLeafReader extends LeafReader {
     }
 
     @Override
-    public AttributeSource attributes() {
-      return in.attributes();
-    }
-
-    @Override
     public int docID() {
       return in.docID();
     }

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/6d6e6714/lucene/core/src/java/org/apache/lucene/index/PostingsEnum.java
----------------------------------------------------------------------
diff --git a/lucene/core/src/java/org/apache/lucene/index/PostingsEnum.java b/lucene/core/src/java/org/apache/lucene/index/PostingsEnum.java
index fdd32a9..e774a78 100644
--- a/lucene/core/src/java/org/apache/lucene/index/PostingsEnum.java
+++ b/lucene/core/src/java/org/apache/lucene/index/PostingsEnum.java
@@ -20,7 +20,6 @@ package org.apache.lucene.index;
 import java.io.IOException;
 
 import org.apache.lucene.search.DocIdSetIterator;
-import org.apache.lucene.util.AttributeSource;
 import org.apache.lucene.util.BytesRef;
 
 /** Iterates through the postings.
@@ -63,8 +62,6 @@ public abstract class PostingsEnum extends DocIdSetIterator {
     return (flags & feature) == feature;
   }
 
-  private AttributeSource atts = null;
-
   /** Sole constructor. (For invocation by subclass 
    *  constructors, typically implicit.) */
   protected PostingsEnum() {
@@ -81,12 +78,6 @@ public abstract class PostingsEnum extends DocIdSetIterator {
    * the result of this method is undefined.
    */
   public abstract int freq() throws IOException;
-  
-  /** Returns the related attributes. */
-  public AttributeSource attributes() {
-    if (atts == null) atts = new AttributeSource();
-    return atts;
-  }
 
   /**
    * Returns the next position, or -1 if positions were not indexed.


Mime
View raw message