mirror of https://github.com/apache/lucene.git
LUCENE-4055: remove dead code
git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/branches/lucene4055@1341027 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
24bb586e9c
commit
3dd32a3841
|
@ -118,7 +118,6 @@ public final class SegmentInfos implements Cloneable, Iterable<SegmentInfo> {
|
|||
private List<SegmentInfo> segments = new ArrayList<SegmentInfo>();
|
||||
private Set<SegmentInfo> segmentSet = new HashSet<SegmentInfo>();
|
||||
private transient List<SegmentInfo> cachedUnmodifiableList;
|
||||
private transient Set<SegmentInfo> cachedUnmodifiableSet;
|
||||
|
||||
private Codec codecFormat;
|
||||
|
||||
|
@ -479,7 +478,6 @@ public final class SegmentInfos implements Cloneable, Iterable<SegmentInfo> {
|
|||
sis.segments = new ArrayList<SegmentInfo>(size());
|
||||
sis.segmentSet = new HashSet<SegmentInfo>(size());
|
||||
sis.cachedUnmodifiableList = null;
|
||||
sis.cachedUnmodifiableSet = null;
|
||||
for(final SegmentInfo info : this) {
|
||||
assert info.getCodec() != null;
|
||||
// dont directly access segments, use add method!!!
|
||||
|
@ -1073,15 +1071,6 @@ public final class SegmentInfos implements Cloneable, Iterable<SegmentInfo> {
|
|||
return cachedUnmodifiableList;
|
||||
}
|
||||
|
||||
/** Returns all contained segments as an <b>unmodifiable</b> {@link Set} view.
|
||||
* The iterator is not sorted, use {@link List} view or {@link #iterator} to get all segments in order. */
|
||||
public Set<SegmentInfo> asSet() {
|
||||
if (cachedUnmodifiableSet == null) {
|
||||
cachedUnmodifiableSet = Collections.unmodifiableSet(segmentSet);
|
||||
}
|
||||
return cachedUnmodifiableSet;
|
||||
}
|
||||
|
||||
public int size() {
|
||||
return segments.size();
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue