Skip to content

Apache Lucene open-source search software

Grammar fixes in comments (#14100)

Viliam Durinacad76ccfd2d7
diff --git a/lucene/core/src/java/org/apache/lucene/codecs/lucene99/Lucene99ScalarQuantizedVectorsWriter.java b/lucene/core/src/java/org/apache/lucene/codecs/lucene99/Lucene99ScalarQuantizedVectorsWriter.java
index 1a30b5271cd..39f3a81983b 100644
--- a/lucene/core/src/java/org/apache/lucene/codecs/lucene99/Lucene99ScalarQuantizedVectorsWriter.java
+++ b/lucene/core/src/java/org/apache/lucene/codecs/lucene99/Lucene99ScalarQuantizedVectorsWriter.java
@@ -223,7 +223,7 @@ public final class Lucene99ScalarQuantizedVectorsWriter extends FlatVectorsWrite
public void mergeOneField(FieldInfo fieldInfo, MergeState mergeState) throws IOException {
rawVectorDelegate.mergeOneField(fieldInfo, mergeState);
// Since we know we will not be searching for additional indexing, we can just write the
- // the vectors directly to the new segment.
+ // vectors directly to the new segment.
// No need to use temporary file as we don't have to re-open for reading
if (fieldInfo.getVectorEncoding().equals(VectorEncoding.FLOAT32)) {
ScalarQuantizer mergedQuantizationState =
diff --git a/lucene/core/src/java/org/apache/lucene/index/CompositeReaderContext.java b/lucene/core/src/java/org/apache/lucene/index/CompositeReaderContext.java
index f64a460325b..0004df794e5 100644
--- a/lucene/core/src/java/org/apache/lucene/index/CompositeReaderContext.java
+++ b/lucene/core/src/java/org/apache/lucene/index/CompositeReaderContext.java
@@ -32,8 +32,8 @@ public final class CompositeReaderContext extends IndexReaderContext {
}
/**
- * Creates a {@link CompositeReaderContext} for intermediate readers that aren't not top-level
- * readers in the current context
+ * Creates a {@link CompositeReaderContext} for intermediate readers that aren't top-level readers
+ * in the current context
*/
CompositeReaderContext(
CompositeReaderContext parent,
diff --git a/lucene/core/src/java/org/apache/lucene/index/DirectoryReader.java b/lucene/core/src/java/org/apache/lucene/index/DirectoryReader.java
index 7571a7f0d07..8f56ae49d3e 100644
--- a/lucene/core/src/java/org/apache/lucene/index/DirectoryReader.java
+++ b/lucene/core/src/java/org/apache/lucene/index/DirectoryReader.java
@@ -124,7 +124,7 @@ public abstract class DirectoryReader extends BaseCompositeReader<LeafReader> {
/**
* Expert: returns an IndexReader reading the index on the given {@link IndexCommit}. This method
- * allows to open indices that were created wih a Lucene version older than N-1 provided that all
+ * allows to open indices that were created with a Lucene version older than N-1 provided that all
* codecs for this index are available in the classpath and the segment file format used was
* created with Lucene 7 or newer. Users of this API must be aware that Lucene doesn't guarantee
* semantic compatibility for indices created with versions older than N-1. All backwards
@@ -150,8 +150,7 @@ public abstract class DirectoryReader extends BaseCompositeReader<LeafReader> {
/**
* If the index has changed since the provided reader was opened, open and return a new reader;
* else, return null. The new reader, if not null, will be the same type of reader as the previous
- * one, ie an NRT reader will open a new NRT reader, a MultiReader will open a new MultiReader,
- * etc.
+ * one, ie an NRT reader will open a new NRT reader etc.
*
* <p>This method is typically far less costly than opening a fully new <code>DirectoryReader
* </code> as it shares resources (for example sub-readers) with the provided <code>
@@ -192,7 +191,7 @@ public abstract class DirectoryReader extends BaseCompositeReader<LeafReader> {
* never returns null).
*
* <p>This provides "near real-time" searching, in that changes made during an {@link IndexWriter}
- * session can be quickly made available for searching without closing the writer nor calling
+ * session can be quickly made available for searching without closing the writer or calling
* {@link IndexWriter#commit}.
*
* <p>It's <i>near</i> real-time because there is no hard guarantee on how quickly you can get a
diff --git a/lucene/core/src/java/org/apache/lucene/index/DocumentsWriter.java b/lucene/core/src/java/org/apache/lucene/index/DocumentsWriter.java
index e32c8b20c04..71797257ee7 100644
--- a/lucene/core/src/java/org/apache/lucene/index/DocumentsWriter.java
+++ b/lucene/core/src/java/org/apache/lucene/index/DocumentsWriter.java
@@ -486,7 +486,7 @@ final class DocumentsWriter implements Closeable, Accountable {
* flush 'B' starts and freezes all deletes occurred since 'A' has
* started. if 'B' finishes before 'A' we need to wait until 'A' is done
* otherwise the deletes frozen by 'B' are not applied to 'A' and we
- * might miss to deletes documents in 'A'.
+ * might miss to delete documents in 'A'.
*/
try {
assert assertTicketQueueModification(flushingDWPT.deleteQueue);
diff --git a/lucene/core/src/java/org/apache/lucene/index/DocumentsWriterFlushControl.java b/lucene/core/src/java/org/apache/lucene/index/DocumentsWriterFlushControl.java
index 170966e8ae4..ed3b9d0698d 100644
--- a/lucene/core/src/java/org/apache/lucene/index/DocumentsWriterFlushControl.java
+++ b/lucene/core/src/java/org/apache/lucene/index/DocumentsWriterFlushControl.java
@@ -216,7 +216,7 @@ final class DocumentsWriterFlushControl implements Accountable, Closeable {
// we need to commit this under lock but calculate it outside of the lock to minimize the time
// this lock is held
// per document. The reason we update this under lock is that we mark DWPTs as pending without
- // acquiring it's
+ // acquiring its
// lock in #setFlushPending and this also reads the committed bytes and modifies the
// flush/activeBytes.
// In the future we can clean this up to be more intuitive.
diff --git a/lucene/core/src/java/org/apache/lucene/index/DocumentsWriterPerThread.java b/lucene/core/src/java/org/apache/lucene/index/DocumentsWriterPerThread.java
index fd6ed22bd4d..13fe8e62fe1 100644
--- a/lucene/core/src/java/org/apache/lucene/index/DocumentsWriterPerThread.java
+++ b/lucene/core/src/java/org/apache/lucene/index/DocumentsWriterPerThread.java
@@ -736,7 +736,7 @@ final class DocumentsWriterPerThread implements Accountable, Lock {
}
/**
- * Commits the current {@link #ramBytesUsed()} and stores it's value for later reuse. The last
+ * Commits the current {@link #ramBytesUsed()} and stores its value for later reuse. The last
* committed bytes used can be retrieved via {@link #getLastCommittedBytesUsed()}
*/
void commitLastBytesUsed(long delta) {
diff --git a/lucene/core/src/java/org/apache/lucene/index/IndexReaderContext.java b/lucene/core/src/java/org/apache/lucene/index/IndexReaderContext.java
index 167900575af..3c79a5e9c7c 100644
--- a/lucene/core/src/java/org/apache/lucene/index/IndexReaderContext.java
+++ b/lucene/core/src/java/org/apache/lucene/index/IndexReaderContext.java
@@ -19,7 +19,7 @@ package org.apache.lucene.index;
import java.util.List;
/**
- * A struct like class that represents a hierarchical relationship between {@link IndexReader}
+ * A struct-like class that represents a hierarchical relationship between {@link IndexReader}
* instances.
*/
public abstract sealed class IndexReaderContext permits CompositeReaderContext, LeafReaderContext {
diff --git a/lucene/core/src/java/org/apache/lucene/index/IndexWriter.java b/lucene/core/src/java/org/apache/lucene/index/IndexWriter.java
index ad11476e734..7c907b31b5d 100644
--- a/lucene/core/src/java/org/apache/lucene/index/IndexWriter.java
+++ b/lucene/core/src/java/org/apache/lucene/index/IndexWriter.java
@@ -2979,7 +2979,7 @@ public class IndexWriter
* @throws CorruptIndexException if the index is corrupt
* @throws IOException if there is a low-level IO error
* @throws IllegalArgumentException if addIndexes would cause the index to exceed {@link
- * #MAX_DOCS}, or if the indoming index sort does not match this index's index sort
+ * #MAX_DOCS}, or if the incoming index sort does not match this index's index sort
*/
public long addIndexes(Directory... dirs) throws IOException {
ensureOpen();
@@ -6029,7 +6029,7 @@ public class IndexWriter
/**
* Interface for internal atomic events. See {@link DocumentsWriter} for details. Events are
* executed concurrently and no order is guaranteed. Each event should only rely on the
- * serializeability within its process method. All actions that must happen before or after a
+ * serializability within its process method. All actions that must happen before or after a
* certain action must be encoded inside the {@link #process(IndexWriter)} method.
*/
@FunctionalInterface
diff --git a/lucene/core/src/java/org/apache/lucene/index/MergePolicy.java b/lucene/core/src/java/org/apache/lucene/index/MergePolicy.java
index d66f5648c03..cbea98daf58 100644
--- a/lucene/core/src/java/org/apache/lucene/index/MergePolicy.java
+++ b/lucene/core/src/java/org/apache/lucene/index/MergePolicy.java
@@ -756,7 +756,7 @@ public abstract class MergePolicy {
/**
* Return the byte size of the provided {@link SegmentCommitInfo}, prorated by percentage of
- * non-deleted documents is set.
+ * non-deleted documents.
*/
protected long size(SegmentCommitInfo info, MergeContext mergeContext) throws IOException {
long byteSize = info.sizeInBytes();
@@ -838,7 +838,7 @@ public abstract class MergePolicy {
}
/**
- * Returns true if the segment represented by the given CodecReader should be keep even if it's
+ * Returns true if the segment represented by the given CodecReader should be kept even if it's
* fully deleted. This is useful for testing of for instance if the merge policy implements
* retention policies for soft deletes.
*/
diff --git a/lucene/core/src/java/org/apache/lucene/index/ReaderPool.java b/lucene/core/src/java/org/apache/lucene/index/ReaderPool.java
index 1bac886c7b4..b7ca6634efb 100644
--- a/lucene/core/src/java/org/apache/lucene/index/ReaderPool.java
+++ b/lucene/core/src/java/org/apache/lucene/index/ReaderPool.java
@@ -273,7 +273,7 @@ final class ReaderPool implements Closeable {
}
/**
- * Returns a list of all currently maintained ReadersAndUpdates sorted by it's ram consumption
+ * Returns a list of all currently maintained ReadersAndUpdates sorted by their ram consumption
* largest to smallest. This list can also contain readers that don't consume any ram at this
* point i.e. don't have any updates buffered.
*/
diff --git a/lucene/core/src/java/org/apache/lucene/index/SegmentReader.java b/lucene/core/src/java/org/apache/lucene/index/SegmentReader.java
index 979d4a7712f..12f48a1d98f 100644
--- a/lucene/core/src/java/org/apache/lucene/index/SegmentReader.java
+++ b/lucene/core/src/java/org/apache/lucene/index/SegmentReader.java
@@ -48,7 +48,7 @@ public final class SegmentReader extends CodecReader {
private final SegmentCommitInfo si;
// this is the original SI that IW uses internally but it's mutated behind the scenes
- // and we don't want this SI to be used for anything. Yet, IW needs this to do maintainance
+ // and we don't want this SI to be used for anything. Yet, IW needs this to do maintenance
// and lookup pooled readers etc.
private final SegmentCommitInfo originalSi;
private final LeafMetaData metaData;
diff --git a/lucene/core/src/java/org/apache/lucene/index/SoftDeletesDirectoryReaderWrapper.java b/lucene/core/src/java/org/apache/lucene/index/SoftDeletesDirectoryReaderWrapper.java
index 1515c8469c1..bbe493d88d3 100644
--- a/lucene/core/src/java/org/apache/lucene/index/SoftDeletesDirectoryReaderWrapper.java
+++ b/lucene/core/src/java/org/apache/lucene/index/SoftDeletesDirectoryReaderWrapper.java
@@ -32,9 +32,9 @@ import org.apache.lucene.util.Bits;
import org.apache.lucene.util.FixedBitSet;
/**
- * This reader filters out documents that have a doc values value in the given field and treat these
- * documents as soft deleted. Hard deleted documents will also be filtered out in the life docs of
- * this reader.
+ * This reader filters out documents that have a doc-values value in the given field and treats
+ * these documents as soft-deleted. Hard deleted documents will also be filtered out in the live
+ * docs of this reader.
*
* @see IndexWriterConfig#setSoftDeletesField(String)
* @see IndexWriter#softUpdateDocument(Term, Iterable, Field...)
@@ -68,7 +68,7 @@ public final class SoftDeletesDirectoryReaderWrapper extends FilterDirectoryRead
protected DirectoryReader doWrapDirectoryReader(DirectoryReader in) throws IOException {
Map<CacheKey, LeafReader> readerCache = new HashMap<>();
for (LeafReader reader : getSequentialSubReaders()) {
- // we try to reuse the life docs instances here if the reader cache key didn't change
+ // we try to reuse the live docs instances here if the reader cache key didn't change
if (reader instanceof SoftDeletesFilterLeafReader && reader.getReaderCacheHelper() != null) {
readerCache.put(
((SoftDeletesFilterLeafReader) reader).reader.getReaderCacheHelper().getKey(), reader);
diff --git a/lucene/core/src/java/org/apache/lucene/index/StoredFieldVisitor.java b/lucene/core/src/java/org/apache/lucene/index/StoredFieldVisitor.java
index 2457f392d11..95dbf11b720 100644
--- a/lucene/core/src/java/org/apache/lucene/index/StoredFieldVisitor.java
+++ b/lucene/core/src/java/org/apache/lucene/index/StoredFieldVisitor.java
@@ -63,7 +63,7 @@ public abstract class StoredFieldVisitor {
/** Process a string field. */
public void stringField(FieldInfo fieldInfo, String value) throws IOException {}
- /** Process a int numeric field. */
+ /** Process an int numeric field. */
public void intField(FieldInfo fieldInfo, int value) throws IOException {}
/** Process a long numeric field. */
diff --git a/lucene/core/src/java/org/apache/lucene/search/MultiCollector.java b/lucene/core/src/java/org/apache/lucene/search/MultiCollector.java
index c5372f3170a..c08f8cdee7e 100644
--- a/lucene/core/src/java/org/apache/lucene/search/MultiCollector.java
+++ b/lucene/core/src/java/org/apache/lucene/search/MultiCollector.java
@@ -25,7 +25,7 @@ import org.apache.lucene.index.LeafReaderContext;
/**
* A {@link Collector} which allows running a search with several {@link Collector}s. It offers a
* static {@link #wrap} method which accepts a list of collectors and wraps them with {@link
- * MultiCollector}, while filtering out the <code>null</code> null ones.
+ * MultiCollector}, while filtering out the <code>null</code> ones.
*
* <p><b>NOTE:</b>When mixing collectors that want to skip low-scoring hits ({@link
* ScoreMode#TOP_SCORES}) with ones that require to see all hits, such as mixing {@link
diff --git a/lucene/core/src/java/org/apache/lucene/search/MultiCollectorManager.java b/lucene/core/src/java/org/apache/lucene/search/MultiCollectorManager.java
index bbdfa56da15..01fa859c753 100644
--- a/lucene/core/src/java/org/apache/lucene/search/MultiCollectorManager.java
+++ b/lucene/core/src/java/org/apache/lucene/search/MultiCollectorManager.java
@@ -22,8 +22,8 @@ import java.util.Collection;
import java.util.List;
/**
- * A {@link CollectorManager} implements which wrap a set of {@link CollectorManager} as {@link
- * MultiCollector} acts for {@link Collector}.
+ * A composite {@link CollectorManager} which wraps a set of {@link CollectorManager} instances,
+ * akin to how {@link MultiCollector} wraps {@link Collector} instances.
*/
public class MultiCollectorManager implements CollectorManager<Collector, Object[]> {
@@ -56,21 +56,21 @@ public class MultiCollectorManager implements CollectorManager<Collector, Object
}
@Override
- public Object[] reduce(Collection<Collector> reducableCollectors) throws IOException {
- final int size = reducableCollectors.size();
+ public Object[] reduce(Collection<Collector> reducibleCollectors) throws IOException {
+ final int size = reducibleCollectors.size();
final Object[] results = new Object[collectorManagers.length];
for (int i = 0; i < collectorManagers.length; i++) {
- final List<Collector> reducableCollector = new ArrayList<>(size);
- for (Collector collector : reducableCollectors) {
+ final List<Collector> reducibleCollector = new ArrayList<>(size);
+ for (Collector collector : reducibleCollectors) {
// MultiCollector will not actually wrap the collector if only one is provided, so we
// check the instance type here:
if (collector instanceof MultiCollector) {
- reducableCollector.add(((MultiCollector) collector).getCollectors()[i]);
+ reducibleCollector.add(((MultiCollector) collector).getCollectors()[i]);
} else {
- reducableCollector.add(collector);
+ reducibleCollector.add(collector);
}
}
- results[i] = collectorManagers[i].reduce(reducableCollector);
+ results[i] = collectorManagers[i].reduce(reducibleCollector);
}
return results;
}
diff --git a/lucene/core/src/java/org/apache/lucene/search/ReferenceManager.java b/lucene/core/src/java/org/apache/lucene/search/ReferenceManager.java
index 699da549d0e..e5a669d85e0 100644
--- a/lucene/core/src/java/org/apache/lucene/search/ReferenceManager.java
+++ b/lucene/core/src/java/org/apache/lucene/search/ReferenceManager.java
@@ -101,8 +101,8 @@ public abstract class ReferenceManager<G> implements Closeable {
if (getRefCount(ref) == 0 && current == ref) {
assert ref != null;
/* if we can't increment the reader but we are
- still the current reference the RM is in a
- illegal states since we can't make any progress
+ still the current reference the RM is in an
+ illegal state since we can't make any progress
anymore. The reference is closed but the RM still
holds on to it as the actual instance.
This can only happen if somebody outside of the RM
diff --git a/lucene/core/src/java/org/apache/lucene/store/FSDirectory.java b/lucene/core/src/java/org/apache/lucene/store/FSDirectory.java
index 0a49cba05e4..5039c779097 100644
--- a/lucene/core/src/java/org/apache/lucene/store/FSDirectory.java
+++ b/lucene/core/src/java/org/apache/lucene/store/FSDirectory.java
@@ -349,7 +349,7 @@ public abstract class FSDirectory extends BaseDirectory {
// a WindowsFSDirectory ...
// LUCENE-6684: we suppress this check for Windows, since a file could be in a confusing
// "pending delete" state, failing the first
- // delete attempt with access denied and then apparently falsely failing here when we try ot
+ // delete attempt with access denied and then apparently falsely failing here when we try to
// delete it again, with NSFE/FNFE
} else {
throw e;
diff --git a/lucene/core/src/java/org/apache/lucene/store/FilterIndexInput.java b/lucene/core/src/java/org/apache/lucene/store/FilterIndexInput.java
index 9e60a51790f..933701b3c3d 100644
--- a/lucene/core/src/java/org/apache/lucene/store/FilterIndexInput.java
+++ b/lucene/core/src/java/org/apache/lucene/store/FilterIndexInput.java
@@ -21,7 +21,7 @@ import java.util.concurrent.CopyOnWriteArrayList;
import org.apache.lucene.internal.tests.TestSecrets;
/**
- * IndexInput implementation that delegates calls to another directory. This class can be used to
+ * IndexInput implementation that delegates calls to another IndexInput. This class can be used to
* add limitations on top of an existing {@link IndexInput} implementation or to add additional
* sanity checks for tests. However, if you plan to write your own {@link IndexInput}
* implementation, you should consider extending directly {@link IndexInput} or {@link DataInput}
diff --git a/lucene/core/src/java/org/apache/lucene/store/IOContext.java b/lucene/core/src/java/org/apache/lucene/store/IOContext.java
index 91f3822dbc1..5f341609748 100644
--- a/lucene/core/src/java/org/apache/lucene/store/IOContext.java
+++ b/lucene/core/src/java/org/apache/lucene/store/IOContext.java
@@ -34,9 +34,7 @@ import org.apache.lucene.util.Constants;
public record IOContext(
Context context, MergeInfo mergeInfo, FlushInfo flushInfo, ReadAdvice readAdvice) {
- /**
- * Context is a enumerator which specifies the context in which the Directory is being used for.
- */
+ /** Context is an enumerator which specifies the context in which the Directory is being used. */
public enum Context {
/** Context for reads and writes that are associated with a merge. */
MERGE,
diff --git a/lucene/core/src/java/org/apache/lucene/store/NRTCachingDirectory.java b/lucene/core/src/java/org/apache/lucene/store/NRTCachingDirectory.java
index 16d6aa22ce5..35a300c1763 100644
--- a/lucene/core/src/java/org/apache/lucene/store/NRTCachingDirectory.java
+++ b/lucene/core/src/java/org/apache/lucene/store/NRTCachingDirectory.java
@@ -56,8 +56,8 @@ import org.apache.lucene.util.IOUtils;
* </pre>
*
* <p>This will cache all newly flushed segments, all merges whose expected segment size is {@code
- * <= 5 MB}, unless the net cached bytes exceeds 60 MB at which point all writes will not be cached
- * (until the net bytes falls below 60 MB).
+ * <= 5 MB}, unless the net cached bytes exceed 60 MB at which point all writes will not be cached
+ * (until the net bytes fall below 60 MB).
*
* @lucene.experimental
*/
diff --git a/lucene/core/src/java/org/apache/lucene/store/RateLimitedIndexOutput.java b/lucene/core/src/java/org/apache/lucene/store/RateLimitedIndexOutput.java
index bfac505b8b0..86c7ca3885f 100644
--- a/lucene/core/src/java/org/apache/lucene/store/RateLimitedIndexOutput.java
+++ b/lucene/core/src/java/org/apache/lucene/store/RateLimitedIndexOutput.java
@@ -31,7 +31,7 @@ public final class RateLimitedIndexOutput extends FilterIndexOutput {
private long bytesSinceLastPause;
/**
- * Cached here not not always have to call RateLimiter#getMinPauseCheckBytes() which does volatile
+ * Cached here to not always have to call RateLimiter#getMinPauseCheckBytes() which does volatile
* read.
*/
private long currentMinPauseCheckBytes;
diff --git a/lucene/core/src/java21/org/apache/lucene/internal/vectorization/PanamaVectorUtilSupport.java b/lucene/core/src/java21/org/apache/lucene/internal/vectorization/PanamaVectorUtilSupport.java
index 1369aa5e3f4..6b2d45d3e29 100644
--- a/lucene/core/src/java21/org/apache/lucene/internal/vectorization/PanamaVectorUtilSupport.java
+++ b/lucene/core/src/java21/org/apache/lucene/internal/vectorization/PanamaVectorUtilSupport.java
@@ -98,7 +98,7 @@ final class PanamaVectorUtilSupport implements VectorUtilSupport {
int i = 0;
float res = 0;
- // if the array size is large (> 2x platform vector size), its worth the overhead to vectorize
+ // if the array size is large (> 2x platform vector size), it's worth the overhead to vectorize
if (a.length > 2 * FLOAT_SPECIES.length()) {
i += FLOAT_SPECIES.loopBound(a.length);
res += dotProductBody(a, b, i);
@@ -161,7 +161,7 @@ final class PanamaVectorUtilSupport implements VectorUtilSupport {
float norm1 = 0;
float norm2 = 0;
- // if the array size is large (> 2x platform vector size), its worth the overhead to vectorize
+ // if the array size is large (> 2x platform vector size), it's worth the overhead to vectorize
if (a.length > 2 * FLOAT_SPECIES.length()) {
i += FLOAT_SPECIES.loopBound(a.length);
float[] ret = cosineBody(a, b, i);
@@ -226,7 +226,7 @@ final class PanamaVectorUtilSupport implements VectorUtilSupport {
int i = 0;
float res = 0;
- // if the array size is large (> 2x platform vector size), its worth the overhead to vectorize
+ // if the array size is large (> 2x platform vector size), it's worth the overhead to vectorize
if (a.length > 2 * FLOAT_SPECIES.length()) {
i += FLOAT_SPECIES.loopBound(a.length);
res += squareDistanceBody(a, b, i);
diff --git a/lucene/misc/src/java/org/apache/lucene/misc/store/DirectIODirectory.java b/lucene/misc/src/java/org/apache/lucene/misc/store/DirectIODirectory.java
index 8b5f4fd76b7..015d0ee1313 100644
--- a/lucene/misc/src/java/org/apache/lucene/misc/store/DirectIODirectory.java
+++ b/lucene/misc/src/java/org/apache/lucene/misc/store/DirectIODirectory.java
@@ -148,7 +148,7 @@ public class DirectIODirectory extends FilterDirectory {
/**
* Determines if direct IO should be used for a file. By default this tests if it is a merge
- * context and if the merge or file length extends the minimum size (see {@link
+ * context and if the merge or file length exceeds the minimum size (see {@link
* #DEFAULT_MIN_BYTES_DIRECT}). Subclasses may override method to enforce direct IO for specific
* file types.
*
@@ -213,8 +213,8 @@ public class DirectIODirectory extends FilterDirectory {
* bypassing OS buffer
*
* @throws UnsupportedOperationException if the JDK does not support Direct I/O
- * @throws IOException if the operating system or filesystem does not support support Direct I/O
- * or a sufficient equivalent.
+ * @throws IOException if the operating system or filesystem does not support Direct I/O or a
+ * sufficient equivalent.
*/
public DirectIOIndexOutput(Path path, String name, int blockSize, int bufferSize)
throws IOException {