Skip to content

Commit 5da315d

Browse files
committed
Rename ThrowIfDisposed to EnsureOpen
1 parent 64feeba commit 5da315d

3 files changed

Lines changed: 3 additions & 3 deletions

File tree

src/Lucene.Net.Tests/Store/TestUnsafeChunkIndexInput.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -169,7 +169,7 @@ internal ManagedChunkIndexInput(string desc, bool ownsRegion, ManagedChunkRegion
169169

170170
public override object Clone()
171171
{
172-
ThrowIfDisposed();
172+
EnsureOpen();
173173
var clone = (ManagedChunkIndexInput)base.Clone();
174174
clone.isRoot = false;
175175
clone.ResetClonedCursor();

src/Lucene.Net/Store/MMapDirectory.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -370,7 +370,7 @@ internal MMapIndexInput(string resourceDescription,
370370
public override object Clone()
371371
{
372372
// A disposed input must not hand out a working clone.
373-
ThrowIfDisposed();
373+
EnsureOpen();
374374
// The clone shares the parent's SharedMapping but does NOT own it.
375375
// ResetClonedCursor clears the inherited cursor cache and gives the
376376
// clone its own reclaimer slot, so the clone and parent read

src/Lucene.Net/Support/Store/UnsafeChunkIndexInput.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,7 @@ protected UnsafeChunkIndexInput(DrainReclaimer reclaimer, string resourceDescrip
146146
/// disposed. Subclasses call this from <c>Clone()</c> (a disposed input
147147
/// must not hand out a working clone); the base calls it on the read paths.
148148
/// </summary>
149-
protected void ThrowIfDisposed()
149+
protected void EnsureOpen()
150150
{
151151
if (Volatile.Read(ref instanceClosed) != 0)
152152
{

0 commit comments

Comments
 (0)