mirror of https://github.com/apache/lucene.git
LUCENE-811: make SegmentInfos class package-private again
git-svn-id: https://svn.apache.org/repos/asf/lucene/java/trunk@511384 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
64449841ed
commit
1486b19a4f
|
@ -16,6 +16,10 @@ API Changes
|
|||
This was done to better call out the possible root causes of an
|
||||
IOException from these methods. (Mike McCandless)
|
||||
|
||||
2. LUCENE-811: make SegmentInfos class, plus a few methods from related
|
||||
classes, package-private again (they were unnecessarily made public
|
||||
as part of LUCENE-701). (Mike McCandless)
|
||||
|
||||
Bug fixes
|
||||
|
||||
1. LUCENE-804: Fixed build.xml to pack a fully compilable src dist. (Doron Cohen)
|
||||
|
|
|
@ -71,7 +71,7 @@ final class IndexFileNames {
|
|||
* @param extension -- extension of the filename (including .)
|
||||
* @param gen -- generation
|
||||
*/
|
||||
public static final String fileNameFromGeneration(String base, String extension, long gen) {
|
||||
static final String fileNameFromGeneration(String base, String extension, long gen) {
|
||||
if (gen == -1) {
|
||||
return null;
|
||||
} else if (gen == 0) {
|
||||
|
|
|
@ -157,7 +157,7 @@ public abstract class IndexReader {
|
|||
|
||||
return (IndexReader) new SegmentInfos.FindSegmentsFile(directory) {
|
||||
|
||||
public Object doBody(String segmentFileName) throws CorruptIndexException, IOException {
|
||||
protected Object doBody(String segmentFileName) throws CorruptIndexException, IOException {
|
||||
|
||||
SegmentInfos infos = new SegmentInfos();
|
||||
infos.read(directory, segmentFileName);
|
||||
|
|
|
@ -94,7 +94,7 @@ final class SegmentInfo {
|
|||
* @param format format of the segments info file
|
||||
* @param input input handle to read segment info from
|
||||
*/
|
||||
public SegmentInfo(Directory dir, int format, IndexInput input) throws IOException {
|
||||
SegmentInfo(Directory dir, int format, IndexInput input) throws IOException {
|
||||
this.dir = dir;
|
||||
name = input.readString();
|
||||
docCount = input.readInt();
|
||||
|
|
|
@ -27,7 +27,7 @@ import java.io.IOException;
|
|||
import java.io.PrintStream;
|
||||
import java.util.Vector;
|
||||
|
||||
public final class SegmentInfos extends Vector {
|
||||
final class SegmentInfos extends Vector {
|
||||
|
||||
/** The file format version, a negative number. */
|
||||
/* Works since counter, the old 1st entry, is always >= 0 */
|
||||
|
@ -235,7 +235,7 @@ public final class SegmentInfos extends Vector {
|
|||
|
||||
new FindSegmentsFile(directory) {
|
||||
|
||||
public Object doBody(String segmentFileName) throws CorruptIndexException, IOException {
|
||||
protected Object doBody(String segmentFileName) throws CorruptIndexException, IOException {
|
||||
read(directory, segmentFileName);
|
||||
return null;
|
||||
}
|
||||
|
@ -315,7 +315,7 @@ public final class SegmentInfos extends Vector {
|
|||
throws CorruptIndexException, IOException {
|
||||
|
||||
return ((Long) new FindSegmentsFile(directory) {
|
||||
public Object doBody(String segmentFileName) throws CorruptIndexException, IOException {
|
||||
protected Object doBody(String segmentFileName) throws CorruptIndexException, IOException {
|
||||
|
||||
IndexInput input = directory.openInput(segmentFileName);
|
||||
|
||||
|
@ -630,5 +630,6 @@ public final class SegmentInfos extends Vector {
|
|||
* during the processing that could have been caused by
|
||||
* a writer committing.
|
||||
*/
|
||||
protected abstract Object doBody(String segmentFileName) throws CorruptIndexException, IOException;}
|
||||
protected abstract Object doBody(String segmentFileName) throws CorruptIndexException, IOException;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue