lucenenet-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From nightowl...@apache.org
Subject [21/38] lucenenet git commit: API: Lucene.Net.Util.IOUtils: Renamed Close() > Dispose(), CloseWhileHandlingException() > DisposeWhileHandlingException()
Date Thu, 22 Jun 2017 05:25:22 GMT
http://git-wip-us.apache.org/repos/asf/lucenenet/blob/7842db8a/src/Lucene.Net/Codecs/Lucene3x/Lucene3xStoredFieldsReader.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net/Codecs/Lucene3x/Lucene3xStoredFieldsReader.cs b/src/Lucene.Net/Codecs/Lucene3x/Lucene3xStoredFieldsReader.cs
index 8e019f2..c18fc59 100644
--- a/src/Lucene.Net/Codecs/Lucene3x/Lucene3xStoredFieldsReader.cs
+++ b/src/Lucene.Net/Codecs/Lucene3x/Lucene3xStoredFieldsReader.cs
@@ -247,7 +247,7 @@ namespace Lucene.Net.Codecs.Lucene3x
             {
                 if (!closed)
                 {
-                    IOUtils.Close(fieldsStream, indexStream, storeCFSReader);
+                    IOUtils.Dispose(fieldsStream, indexStream, storeCFSReader);
                     closed = true;
                 }
             }

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/7842db8a/src/Lucene.Net/Codecs/Lucene3x/Lucene3xTermVectorsReader.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net/Codecs/Lucene3x/Lucene3xTermVectorsReader.cs b/src/Lucene.Net/Codecs/Lucene3x/Lucene3xTermVectorsReader.cs
index 7fbdf32..75f5c18 100644
--- a/src/Lucene.Net/Codecs/Lucene3x/Lucene3xTermVectorsReader.cs
+++ b/src/Lucene.Net/Codecs/Lucene3x/Lucene3xTermVectorsReader.cs
@@ -206,7 +206,7 @@ namespace Lucene.Net.Codecs.Lucene3x
         {
             if (disposing)
             {
-                IOUtils.Close(tvx, tvd, tvf, storeCFSReader);
+                IOUtils.Dispose(tvx, tvd, tvf, storeCFSReader);
             }
         }
 

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/7842db8a/src/Lucene.Net/Codecs/Lucene3x/TermInfosReader.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net/Codecs/Lucene3x/TermInfosReader.cs b/src/Lucene.Net/Codecs/Lucene3x/TermInfosReader.cs
index 90360e8..81f2e43 100644
--- a/src/Lucene.Net/Codecs/Lucene3x/TermInfosReader.cs
+++ b/src/Lucene.Net/Codecs/Lucene3x/TermInfosReader.cs
@@ -182,7 +182,7 @@ namespace Lucene.Net.Codecs.Lucene3x
 
         public void Dispose()
         {
-            IOUtils.Close(origEnum, threadResources);
+            IOUtils.Dispose(origEnum, threadResources);
         }
 
         /// <summary>

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/7842db8a/src/Lucene.Net/Codecs/Lucene40/BitVector.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net/Codecs/Lucene40/BitVector.cs b/src/Lucene.Net/Codecs/Lucene40/BitVector.cs
index eb1605a..a33b95b 100644
--- a/src/Lucene.Net/Codecs/Lucene40/BitVector.cs
+++ b/src/Lucene.Net/Codecs/Lucene40/BitVector.cs
@@ -285,7 +285,7 @@ namespace Lucene.Net.Codecs.Lucene40
             }
             finally
             {
-                IOUtils.Close(output);
+                IOUtils.Dispose(output);
             }
         }
 

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/7842db8a/src/Lucene.Net/Codecs/Lucene40/Lucene40DocValuesReader.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net/Codecs/Lucene40/Lucene40DocValuesReader.cs b/src/Lucene.Net/Codecs/Lucene40/Lucene40DocValuesReader.cs
index bca9a0c..11988b1 100644
--- a/src/Lucene.Net/Codecs/Lucene40/Lucene40DocValuesReader.cs
+++ b/src/Lucene.Net/Codecs/Lucene40/Lucene40DocValuesReader.cs
@@ -126,11 +126,11 @@ namespace Lucene.Net.Codecs.Lucene40
                     {
                         if (success)
                         {
-                            IOUtils.Close(input);
+                            IOUtils.Dispose(input);
                         }
                         else
                         {
-                            IOUtils.CloseWhileHandlingException(input);
+                            IOUtils.DisposeWhileHandlingException(input);
                         }
                     }
                     numericInstances[field.Number] = instance;
@@ -476,11 +476,11 @@ namespace Lucene.Net.Codecs.Lucene40
             {
                 if (success)
                 {
-                    IOUtils.Close(input);
+                    IOUtils.Dispose(input);
                 }
                 else
                 {
-                    IOUtils.CloseWhileHandlingException(input);
+                    IOUtils.DisposeWhileHandlingException(input);
                 }
             }
         }
@@ -530,11 +530,11 @@ namespace Lucene.Net.Codecs.Lucene40
             {
                 if (success)
                 {
-                    IOUtils.Close(data, index);
+                    IOUtils.Dispose(data, index);
                 }
                 else
                 {
-                    IOUtils.CloseWhileHandlingException(data, index);
+                    IOUtils.DisposeWhileHandlingException(data, index);
                 }
             }
         }
@@ -588,11 +588,11 @@ namespace Lucene.Net.Codecs.Lucene40
             {
                 if (success)
                 {
-                    IOUtils.Close(data, index);
+                    IOUtils.Dispose(data, index);
                 }
                 else
                 {
-                    IOUtils.CloseWhileHandlingException(data, index);
+                    IOUtils.DisposeWhileHandlingException(data, index);
                 }
             }
         }
@@ -646,11 +646,11 @@ namespace Lucene.Net.Codecs.Lucene40
             {
                 if (success)
                 {
-                    IOUtils.Close(data, index);
+                    IOUtils.Dispose(data, index);
                 }
                 else
                 {
-                    IOUtils.CloseWhileHandlingException(data, index);
+                    IOUtils.DisposeWhileHandlingException(data, index);
                 }
             }
         }
@@ -726,11 +726,11 @@ namespace Lucene.Net.Codecs.Lucene40
                     {
                         if (success)
                         {
-                            IOUtils.Close(data, index);
+                            IOUtils.Dispose(data, index);
                         }
                         else
                         {
-                            IOUtils.CloseWhileHandlingException(data, index);
+                            IOUtils.DisposeWhileHandlingException(data, index);
                         }
                     }
                     sortedInstances[field.Number] = instance;

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/7842db8a/src/Lucene.Net/Codecs/Lucene40/Lucene40FieldInfosReader.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net/Codecs/Lucene40/Lucene40FieldInfosReader.cs b/src/Lucene.Net/Codecs/Lucene40/Lucene40FieldInfosReader.cs
index 3f14e3f..ac18c98 100644
--- a/src/Lucene.Net/Codecs/Lucene40/Lucene40FieldInfosReader.cs
+++ b/src/Lucene.Net/Codecs/Lucene40/Lucene40FieldInfosReader.cs
@@ -130,7 +130,7 @@ namespace Lucene.Net.Codecs.Lucene40
                 }
                 else
                 {
-                    IOUtils.CloseWhileHandlingException(input);
+                    IOUtils.DisposeWhileHandlingException(input);
                 }
             }
         }

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/7842db8a/src/Lucene.Net/Codecs/Lucene40/Lucene40PostingsReader.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net/Codecs/Lucene40/Lucene40PostingsReader.cs b/src/Lucene.Net/Codecs/Lucene40/Lucene40PostingsReader.cs
index 12fb35d..0757d9a 100644
--- a/src/Lucene.Net/Codecs/Lucene40/Lucene40PostingsReader.cs
+++ b/src/Lucene.Net/Codecs/Lucene40/Lucene40PostingsReader.cs
@@ -104,7 +104,7 @@ namespace Lucene.Net.Codecs.Lucene40
             {
                 if (!success)
                 {
-                    IOUtils.CloseWhileHandlingException(freqIn, proxIn);
+                    IOUtils.DisposeWhileHandlingException(freqIn, proxIn);
                 }
             }
         }

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/7842db8a/src/Lucene.Net/Codecs/Lucene40/Lucene40SegmentInfoReader.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net/Codecs/Lucene40/Lucene40SegmentInfoReader.cs b/src/Lucene.Net/Codecs/Lucene40/Lucene40SegmentInfoReader.cs
index 07b728f..00bb659 100644
--- a/src/Lucene.Net/Codecs/Lucene40/Lucene40SegmentInfoReader.cs
+++ b/src/Lucene.Net/Codecs/Lucene40/Lucene40SegmentInfoReader.cs
@@ -75,7 +75,7 @@ namespace Lucene.Net.Codecs.Lucene40
             {
                 if (!success)
                 {
-                    IOUtils.CloseWhileHandlingException(input);
+                    IOUtils.DisposeWhileHandlingException(input);
                 }
                 else
                 {

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/7842db8a/src/Lucene.Net/Codecs/Lucene40/Lucene40SegmentInfoWriter.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net/Codecs/Lucene40/Lucene40SegmentInfoWriter.cs b/src/Lucene.Net/Codecs/Lucene40/Lucene40SegmentInfoWriter.cs
index ef8807f..8b4b00f 100644
--- a/src/Lucene.Net/Codecs/Lucene40/Lucene40SegmentInfoWriter.cs
+++ b/src/Lucene.Net/Codecs/Lucene40/Lucene40SegmentInfoWriter.cs
@@ -71,7 +71,7 @@ namespace Lucene.Net.Codecs.Lucene40
             {
                 if (!success)
                 {
-                    IOUtils.CloseWhileHandlingException(output);
+                    IOUtils.DisposeWhileHandlingException(output);
                     si.Dir.DeleteFile(fileName);
                 }
                 else

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/7842db8a/src/Lucene.Net/Codecs/Lucene40/Lucene40StoredFieldsReader.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net/Codecs/Lucene40/Lucene40StoredFieldsReader.cs b/src/Lucene.Net/Codecs/Lucene40/Lucene40StoredFieldsReader.cs
index 2ce0261..218a262 100644
--- a/src/Lucene.Net/Codecs/Lucene40/Lucene40StoredFieldsReader.cs
+++ b/src/Lucene.Net/Codecs/Lucene40/Lucene40StoredFieldsReader.cs
@@ -141,7 +141,7 @@ namespace Lucene.Net.Codecs.Lucene40
             {
                 if (!closed)
                 {
-                    IOUtils.Close(fieldsStream, indexStream);
+                    IOUtils.Dispose(fieldsStream, indexStream);
                     closed = true;
                 }
             }

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/7842db8a/src/Lucene.Net/Codecs/Lucene40/Lucene40StoredFieldsWriter.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net/Codecs/Lucene40/Lucene40StoredFieldsWriter.cs b/src/Lucene.Net/Codecs/Lucene40/Lucene40StoredFieldsWriter.cs
index 77eeced..44b680c 100644
--- a/src/Lucene.Net/Codecs/Lucene40/Lucene40StoredFieldsWriter.cs
+++ b/src/Lucene.Net/Codecs/Lucene40/Lucene40StoredFieldsWriter.cs
@@ -129,7 +129,7 @@ namespace Lucene.Net.Codecs.Lucene40
             {
                 try
                 {
-                    IOUtils.Close(fieldsStream, indexStream);
+                    IOUtils.Dispose(fieldsStream, indexStream);
                 }
                 finally
                 {

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/7842db8a/src/Lucene.Net/Codecs/Lucene40/Lucene40TermVectorsReader.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net/Codecs/Lucene40/Lucene40TermVectorsReader.cs b/src/Lucene.Net/Codecs/Lucene40/Lucene40TermVectorsReader.cs
index 0d44dec..1e5da3a 100644
--- a/src/Lucene.Net/Codecs/Lucene40/Lucene40TermVectorsReader.cs
+++ b/src/Lucene.Net/Codecs/Lucene40/Lucene40TermVectorsReader.cs
@@ -234,7 +234,7 @@ namespace Lucene.Net.Codecs.Lucene40
         protected override void Dispose(bool disposing)
         {
             if (disposing)
-                IOUtils.Close(tvx, tvd, tvf);
+                IOUtils.Dispose(tvx, tvd, tvf);
         }
 
         /// <summary>

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/7842db8a/src/Lucene.Net/Codecs/Lucene40/Lucene40TermVectorsWriter.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net/Codecs/Lucene40/Lucene40TermVectorsWriter.cs b/src/Lucene.Net/Codecs/Lucene40/Lucene40TermVectorsWriter.cs
index 5a8063e..9ff8537 100644
--- a/src/Lucene.Net/Codecs/Lucene40/Lucene40TermVectorsWriter.cs
+++ b/src/Lucene.Net/Codecs/Lucene40/Lucene40TermVectorsWriter.cs
@@ -511,7 +511,7 @@ namespace Lucene.Net.Codecs.Lucene40
             {
                 // make an effort to close all streams we can but remember and re-throw
                 // the first exception encountered in this process
-                IOUtils.Close(tvx, tvd, tvf);
+                IOUtils.Dispose(tvx, tvd, tvf);
                 tvx = tvd = tvf = null;
             }
         }

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/7842db8a/src/Lucene.Net/Codecs/Lucene41/Lucene41PostingsFormat.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net/Codecs/Lucene41/Lucene41PostingsFormat.cs b/src/Lucene.Net/Codecs/Lucene41/Lucene41PostingsFormat.cs
index 043b6e7..f1c9f13 100644
--- a/src/Lucene.Net/Codecs/Lucene41/Lucene41PostingsFormat.cs
+++ b/src/Lucene.Net/Codecs/Lucene41/Lucene41PostingsFormat.cs
@@ -417,7 +417,7 @@ namespace Lucene.Net.Codecs.Lucene41
             {
                 if (!success)
                 {
-                    IOUtils.CloseWhileHandlingException(postingsWriter);
+                    IOUtils.DisposeWhileHandlingException(postingsWriter);
                 }
             }
         }
@@ -436,7 +436,7 @@ namespace Lucene.Net.Codecs.Lucene41
             {
                 if (!success)
                 {
-                    IOUtils.CloseWhileHandlingException(postingsReader);
+                    IOUtils.DisposeWhileHandlingException(postingsReader);
                 }
             }
         }

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/7842db8a/src/Lucene.Net/Codecs/Lucene41/Lucene41PostingsReader.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net/Codecs/Lucene41/Lucene41PostingsReader.cs b/src/Lucene.Net/Codecs/Lucene41/Lucene41PostingsReader.cs
index b31126d..66bf4db 100644
--- a/src/Lucene.Net/Codecs/Lucene41/Lucene41PostingsReader.cs
+++ b/src/Lucene.Net/Codecs/Lucene41/Lucene41PostingsReader.cs
@@ -77,7 +77,7 @@ namespace Lucene.Net.Codecs.Lucene41
             {
                 if (!success)
                 {
-                    IOUtils.CloseWhileHandlingException(docIn, posIn, payIn);
+                    IOUtils.DisposeWhileHandlingException(docIn, posIn, payIn);
                 }
             }
         }
@@ -133,7 +133,7 @@ namespace Lucene.Net.Codecs.Lucene41
         protected override void Dispose(bool disposing)
         {
             if (disposing)
-                IOUtils.Close(docIn, posIn, payIn);
+                IOUtils.Dispose(docIn, posIn, payIn);
         }
 
         public override void DecodeTerm(long[] longs, DataInput @in, FieldInfo fieldInfo, BlockTermState termState, bool absolute)

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/7842db8a/src/Lucene.Net/Codecs/Lucene41/Lucene41PostingsWriter.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net/Codecs/Lucene41/Lucene41PostingsWriter.cs b/src/Lucene.Net/Codecs/Lucene41/Lucene41PostingsWriter.cs
index 5494d64..e2c44e6 100644
--- a/src/Lucene.Net/Codecs/Lucene41/Lucene41PostingsWriter.cs
+++ b/src/Lucene.Net/Codecs/Lucene41/Lucene41PostingsWriter.cs
@@ -174,7 +174,7 @@ namespace Lucene.Net.Codecs.Lucene41
             {
                 if (!success)
                 {
-                    IOUtils.CloseWhileHandlingException(docOut, posOut, payOut);
+                    IOUtils.DisposeWhileHandlingException(docOut, posOut, payOut);
                 }
             }
 
@@ -679,11 +679,11 @@ namespace Lucene.Net.Codecs.Lucene41
                 {
                     if (success)
                     {
-                        IOUtils.Close(docOut, posOut, payOut);
+                        IOUtils.Dispose(docOut, posOut, payOut);
                     }
                     else
                     {
-                        IOUtils.CloseWhileHandlingException(docOut, posOut, payOut);
+                        IOUtils.DisposeWhileHandlingException(docOut, posOut, payOut);
                     }
                     docOut = posOut = payOut = null;
                 }

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/7842db8a/src/Lucene.Net/Codecs/Lucene42/Lucene42DocValuesProducer.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net/Codecs/Lucene42/Lucene42DocValuesProducer.cs b/src/Lucene.Net/Codecs/Lucene42/Lucene42DocValuesProducer.cs
index dc52a9e..fab7de3 100644
--- a/src/Lucene.Net/Codecs/Lucene42/Lucene42DocValuesProducer.cs
+++ b/src/Lucene.Net/Codecs/Lucene42/Lucene42DocValuesProducer.cs
@@ -124,11 +124,11 @@ namespace Lucene.Net.Codecs.Lucene42
             {
                 if (success)
                 {
-                    IOUtils.Close(@in);
+                    IOUtils.Dispose(@in);
                 }
                 else
                 {
-                    IOUtils.CloseWhileHandlingException(@in);
+                    IOUtils.DisposeWhileHandlingException(@in);
                 }
             }
 
@@ -149,7 +149,7 @@ namespace Lucene.Net.Codecs.Lucene42
             {
                 if (!success)
                 {
-                    IOUtils.CloseWhileHandlingException(this.data);
+                    IOUtils.DisposeWhileHandlingException(this.data);
                 }
             }
         }

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/7842db8a/src/Lucene.Net/Codecs/Lucene42/Lucene42FieldInfosReader.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net/Codecs/Lucene42/Lucene42FieldInfosReader.cs b/src/Lucene.Net/Codecs/Lucene42/Lucene42FieldInfosReader.cs
index 7c5bff8..36abd25 100644
--- a/src/Lucene.Net/Codecs/Lucene42/Lucene42FieldInfosReader.cs
+++ b/src/Lucene.Net/Codecs/Lucene42/Lucene42FieldInfosReader.cs
@@ -115,7 +115,7 @@ namespace Lucene.Net.Codecs.Lucene42
                 }
                 else
                 {
-                    IOUtils.CloseWhileHandlingException(input);
+                    IOUtils.DisposeWhileHandlingException(input);
                 }
             }
         }

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/7842db8a/src/Lucene.Net/Codecs/Lucene42/Lucene42NormsConsumer.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net/Codecs/Lucene42/Lucene42NormsConsumer.cs b/src/Lucene.Net/Codecs/Lucene42/Lucene42NormsConsumer.cs
index 3351309..7d0b4b0 100644
--- a/src/Lucene.Net/Codecs/Lucene42/Lucene42NormsConsumer.cs
+++ b/src/Lucene.Net/Codecs/Lucene42/Lucene42NormsConsumer.cs
@@ -70,7 +70,7 @@ namespace Lucene.Net.Codecs.Lucene42
             {
                 if (!success)
                 {
-                    IOUtils.CloseWhileHandlingException(this);
+                    IOUtils.DisposeWhileHandlingException(this);
                 }
             }
         }
@@ -219,11 +219,11 @@ namespace Lucene.Net.Codecs.Lucene42
                 {
                     if (success)
                     {
-                        IOUtils.Close(data, meta);
+                        IOUtils.Dispose(data, meta);
                     }
                     else
                     {
-                        IOUtils.CloseWhileHandlingException(data, meta);
+                        IOUtils.DisposeWhileHandlingException(data, meta);
                     }
                     meta = data = null;
                 }

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/7842db8a/src/Lucene.Net/Codecs/Lucene45/Lucene45DocValuesConsumer.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net/Codecs/Lucene45/Lucene45DocValuesConsumer.cs b/src/Lucene.Net/Codecs/Lucene45/Lucene45DocValuesConsumer.cs
index 9907b28..085f813 100644
--- a/src/Lucene.Net/Codecs/Lucene45/Lucene45DocValuesConsumer.cs
+++ b/src/Lucene.Net/Codecs/Lucene45/Lucene45DocValuesConsumer.cs
@@ -103,7 +103,7 @@ namespace Lucene.Net.Codecs.Lucene45
             {
                 if (!success)
                 {
-                    IOUtils.CloseWhileHandlingException(this);
+                    IOUtils.DisposeWhileHandlingException(this);
                 }
             }
         }
@@ -520,11 +520,11 @@ namespace Lucene.Net.Codecs.Lucene45
                 {
                     if (success)
                     {
-                        IOUtils.Close(data, meta);
+                        IOUtils.Dispose(data, meta);
                     }
                     else
                     {
-                        IOUtils.CloseWhileHandlingException(data, meta);
+                        IOUtils.DisposeWhileHandlingException(data, meta);
                     }
                     meta = data = null;
                 }

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/7842db8a/src/Lucene.Net/Codecs/Lucene45/Lucene45DocValuesProducer.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net/Codecs/Lucene45/Lucene45DocValuesProducer.cs b/src/Lucene.Net/Codecs/Lucene45/Lucene45DocValuesProducer.cs
index 300b1cf..8e1c953 100644
--- a/src/Lucene.Net/Codecs/Lucene45/Lucene45DocValuesProducer.cs
+++ b/src/Lucene.Net/Codecs/Lucene45/Lucene45DocValuesProducer.cs
@@ -103,11 +103,11 @@ namespace Lucene.Net.Codecs.Lucene45
             {
                 if (success)
                 {
-                    IOUtils.Close(@in);
+                    IOUtils.Dispose(@in);
                 }
                 else
                 {
-                    IOUtils.CloseWhileHandlingException(@in);
+                    IOUtils.DisposeWhileHandlingException(@in);
                 }
             }
 
@@ -128,7 +128,7 @@ namespace Lucene.Net.Codecs.Lucene45
             {
                 if (!success)
                 {
-                    IOUtils.CloseWhileHandlingException(this.data);
+                    IOUtils.DisposeWhileHandlingException(this.data);
                 }
             }
 

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/7842db8a/src/Lucene.Net/Codecs/Lucene46/Lucene46FieldInfosReader.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net/Codecs/Lucene46/Lucene46FieldInfosReader.cs b/src/Lucene.Net/Codecs/Lucene46/Lucene46FieldInfosReader.cs
index e46df2d..75c1666 100644
--- a/src/Lucene.Net/Codecs/Lucene46/Lucene46FieldInfosReader.cs
+++ b/src/Lucene.Net/Codecs/Lucene46/Lucene46FieldInfosReader.cs
@@ -122,7 +122,7 @@ namespace Lucene.Net.Codecs.Lucene46
                 }
                 else
                 {
-                    IOUtils.CloseWhileHandlingException(input);
+                    IOUtils.DisposeWhileHandlingException(input);
                 }
             }
         }

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/7842db8a/src/Lucene.Net/Codecs/Lucene46/Lucene46FieldInfosWriter.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net/Codecs/Lucene46/Lucene46FieldInfosWriter.cs b/src/Lucene.Net/Codecs/Lucene46/Lucene46FieldInfosWriter.cs
index eafa70d..1600241 100644
--- a/src/Lucene.Net/Codecs/Lucene46/Lucene46FieldInfosWriter.cs
+++ b/src/Lucene.Net/Codecs/Lucene46/Lucene46FieldInfosWriter.cs
@@ -110,7 +110,7 @@ namespace Lucene.Net.Codecs.Lucene46
                 }
                 else
                 {
-                    IOUtils.CloseWhileHandlingException(output);
+                    IOUtils.DisposeWhileHandlingException(output);
                 }
             }
         }

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/7842db8a/src/Lucene.Net/Codecs/Lucene46/Lucene46SegmentInfoReader.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net/Codecs/Lucene46/Lucene46SegmentInfoReader.cs b/src/Lucene.Net/Codecs/Lucene46/Lucene46SegmentInfoReader.cs
index 19a856a..5fd7bf8 100644
--- a/src/Lucene.Net/Codecs/Lucene46/Lucene46SegmentInfoReader.cs
+++ b/src/Lucene.Net/Codecs/Lucene46/Lucene46SegmentInfoReader.cs
@@ -81,7 +81,7 @@ namespace Lucene.Net.Codecs.Lucene46
             {
                 if (!success)
                 {
-                    IOUtils.CloseWhileHandlingException(input);
+                    IOUtils.DisposeWhileHandlingException(input);
                 }
                 else
                 {

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/7842db8a/src/Lucene.Net/Codecs/Lucene46/Lucene46SegmentInfoWriter.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net/Codecs/Lucene46/Lucene46SegmentInfoWriter.cs b/src/Lucene.Net/Codecs/Lucene46/Lucene46SegmentInfoWriter.cs
index a39be6d..aaa3869 100644
--- a/src/Lucene.Net/Codecs/Lucene46/Lucene46SegmentInfoWriter.cs
+++ b/src/Lucene.Net/Codecs/Lucene46/Lucene46SegmentInfoWriter.cs
@@ -66,7 +66,7 @@ namespace Lucene.Net.Codecs.Lucene46
             {
                 if (!success)
                 {
-                    IOUtils.CloseWhileHandlingException(output);
+                    IOUtils.DisposeWhileHandlingException(output);
                     si.Dir.DeleteFile(fileName);
                 }
                 else

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/7842db8a/src/Lucene.Net/Codecs/PerField/PerFieldDocValuesFormat.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net/Codecs/PerField/PerFieldDocValuesFormat.cs b/src/Lucene.Net/Codecs/PerField/PerFieldDocValuesFormat.cs
index 45a0517..5b9cc74 100644
--- a/src/Lucene.Net/Codecs/PerField/PerFieldDocValuesFormat.cs
+++ b/src/Lucene.Net/Codecs/PerField/PerFieldDocValuesFormat.cs
@@ -214,7 +214,7 @@ namespace Lucene.Net.Codecs.PerField
                 if (disposing)
                 {
                     // Close all subs
-                    IOUtils.Close(formats.Values);
+                    IOUtils.Dispose(formats.Values);
                 }
             }
         }
@@ -280,7 +280,7 @@ namespace Lucene.Net.Codecs.PerField
                 {
                     if (!success)
                     {
-                        IOUtils.CloseWhileHandlingException(formats.Values);
+                        IOUtils.DisposeWhileHandlingException(formats.Values);
                     }
                 }
             }
@@ -362,7 +362,7 @@ namespace Lucene.Net.Codecs.PerField
             {
                 if (disposing)
                 {
-                    IOUtils.Close(formats.Values);
+                    IOUtils.Dispose(formats.Values);
                 }
             }
 

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/7842db8a/src/Lucene.Net/Codecs/PerField/PerFieldPostingsFormat.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net/Codecs/PerField/PerFieldPostingsFormat.cs b/src/Lucene.Net/Codecs/PerField/PerFieldPostingsFormat.cs
index 66a0734..0b0be1a 100644
--- a/src/Lucene.Net/Codecs/PerField/PerFieldPostingsFormat.cs
+++ b/src/Lucene.Net/Codecs/PerField/PerFieldPostingsFormat.cs
@@ -165,7 +165,7 @@ namespace Lucene.Net.Codecs.PerField
                 if (disposing)
                 {
                     // Close all subs
-                    IOUtils.Close(formats.Values);
+                    IOUtils.Dispose(formats.Values);
                 }
             }
         }
@@ -234,7 +234,7 @@ namespace Lucene.Net.Codecs.PerField
                 {
                     if (!success)
                     {
-                        IOUtils.CloseWhileHandlingException(formats.Values);
+                        IOUtils.DisposeWhileHandlingException(formats.Values);
                     }
                 }
             }
@@ -264,7 +264,7 @@ namespace Lucene.Net.Codecs.PerField
             {
                 if (disposing)
                 {
-                    IOUtils.Close(formats.Values);
+                    IOUtils.Dispose(formats.Values);
                 }
             }
 

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/7842db8a/src/Lucene.Net/Index/DocInverterPerField.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net/Index/DocInverterPerField.cs b/src/Lucene.Net/Index/DocInverterPerField.cs
index 8b6b8d4..9724363 100644
--- a/src/Lucene.Net/Index/DocInverterPerField.cs
+++ b/src/Lucene.Net/Index/DocInverterPerField.cs
@@ -224,7 +224,7 @@ namespace Lucene.Net.Index
                     {
                         if (!succeededInProcessingField)
                         {
-                            IOUtils.CloseWhileHandlingException(stream);
+                            IOUtils.DisposeWhileHandlingException(stream);
                         }
                         else
                         {

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/7842db8a/src/Lucene.Net/Index/DocValuesProcessor.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net/Index/DocValuesProcessor.cs b/src/Lucene.Net/Index/DocValuesProcessor.cs
index 3f6da3a..6de3f99 100644
--- a/src/Lucene.Net/Index/DocValuesProcessor.cs
+++ b/src/Lucene.Net/Index/DocValuesProcessor.cs
@@ -110,11 +110,11 @@ namespace Lucene.Net.Index
                 {
                     if (success)
                     {
-                        IOUtils.Close(dvConsumer);
+                        IOUtils.Dispose(dvConsumer);
                     }
                     else
                     {
-                        IOUtils.CloseWhileHandlingException(dvConsumer);
+                        IOUtils.DisposeWhileHandlingException(dvConsumer);
                     }
                 }
             }

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/7842db8a/src/Lucene.Net/Index/FreqProxTermsWriter.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net/Index/FreqProxTermsWriter.cs b/src/Lucene.Net/Index/FreqProxTermsWriter.cs
index 22f0ee7..f857c61 100644
--- a/src/Lucene.Net/Index/FreqProxTermsWriter.cs
+++ b/src/Lucene.Net/Index/FreqProxTermsWriter.cs
@@ -108,11 +108,11 @@ namespace Lucene.Net.Index
             {
                 if (success)
                 {
-                    IOUtils.Close(consumer);
+                    IOUtils.Dispose(consumer);
                 }
                 else
                 {
-                    IOUtils.CloseWhileHandlingException(consumer);
+                    IOUtils.DisposeWhileHandlingException(consumer);
                 }
             }
         }

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/7842db8a/src/Lucene.Net/Index/IndexWriter.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net/Index/IndexWriter.cs b/src/Lucene.Net/Index/IndexWriter.cs
index 5ad4af8..66bb35c 100644
--- a/src/Lucene.Net/Index/IndexWriter.cs
+++ b/src/Lucene.Net/Index/IndexWriter.cs
@@ -427,7 +427,7 @@ namespace Lucene.Net.Index
             {
                 if (!success2)
                 {
-                    IOUtils.CloseWhileHandlingException(r);
+                    IOUtils.DisposeWhileHandlingException(r);
                 }
             }
             return r;
@@ -945,7 +945,7 @@ namespace Lucene.Net.Index
                     {
                         infoStream.Message("IW", "init: hit exception on init; releasing write lock");
                     }
-                    IOUtils.CloseWhileHandlingException(writeLock);
+                    IOUtils.DisposeWhileHandlingException(writeLock);
                     writeLock = null;
                 }
             }
@@ -1237,7 +1237,7 @@ namespace Lucene.Net.Index
                     finally
                     {
                         // shutdown policy, scheduler and all threads (this call is not interruptible):
-                        IOUtils.CloseWhileHandlingException(mergePolicy, mergeScheduler);
+                        IOUtils.DisposeWhileHandlingException(mergePolicy, mergeScheduler);
                     }
                 }
 
@@ -2593,7 +2593,7 @@ namespace Lucene.Net.Index
                     deleter.Refresh();
                     deleter.Dispose();
 
-                    IOUtils.Close(writeLock); // release write lock
+                    IOUtils.Dispose(writeLock); // release write lock
                     writeLock = null;
 
                     Debug.Assert(docWriter.perThreadPool.NumDeactivatedThreadStates() == docWriter.perThreadPool.MaxThreadStates, "" + docWriter.perThreadPool.NumDeactivatedThreadStates() + " " + docWriter.perThreadPool.MaxThreadStates);
@@ -2612,7 +2612,7 @@ namespace Lucene.Net.Index
                     // Must not hold IW's lock while closing
                     // mergePolicy/Scheduler: this can lead to deadlock,
                     // e.g. TestIW.testThreadInterruptDeadlock
-                    IOUtils.CloseWhileHandlingException(mergePolicy, mergeScheduler);
+                    IOUtils.DisposeWhileHandlingException(mergePolicy, mergeScheduler);
                 }
                 lock (this)
                 {
@@ -2634,7 +2634,7 @@ namespace Lucene.Net.Index
                         }
 
                         // close all the closeables we can (but important is readerPool and writeLock to prevent leaks)
-                        IOUtils.CloseWhileHandlingException(readerPool, deleter, writeLock);
+                        IOUtils.DisposeWhileHandlingException(readerPool, deleter, writeLock);
                         writeLock = null;
                     }
                     closed = true;
@@ -2962,7 +2962,7 @@ namespace Lucene.Net.Index
 
         /// <summary>
         /// Acquires write locks on all the directories; be sure
-        /// to match with a call to <see cref="IOUtils.Close(IEnumerable{IDisposable})"/> in a
+        /// to match with a call to <see cref="IOUtils.Dispose(IEnumerable{IDisposable})"/> in a
         /// finally clause.
         /// </summary>
         private IEnumerable<Lock> AcquireWriteLocks(params Directory[] dirs)
@@ -2983,7 +2983,7 @@ namespace Lucene.Net.Index
                     if (!success)
                     {
                         // Release all previously acquired locks:
-                        IOUtils.CloseWhileHandlingException(locks);
+                        IOUtils.DisposeWhileHandlingException(locks);
                     }
                 }
             }
@@ -3151,11 +3151,11 @@ namespace Lucene.Net.Index
             {
                 if (successTop)
                 {
-                    IOUtils.Close(locks);
+                    IOUtils.Dispose(locks);
                 }
                 else
                 {
-                    IOUtils.CloseWhileHandlingException(locks);
+                    IOUtils.DisposeWhileHandlingException(locks);
                 }
             }
         }
@@ -5775,7 +5775,7 @@ namespace Lucene.Net.Index
                 bool success = false;
                 try
                 {
-                    IOUtils.CloseWhileHandlingException(prior, cfsDir);
+                    IOUtils.DisposeWhileHandlingException(prior, cfsDir);
                     success = true;
                 }
                 finally

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/7842db8a/src/Lucene.Net/Index/NormsConsumer.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net/Index/NormsConsumer.cs b/src/Lucene.Net/Index/NormsConsumer.cs
index 444cd6c..a8e6b78 100644
--- a/src/Lucene.Net/Index/NormsConsumer.cs
+++ b/src/Lucene.Net/Index/NormsConsumer.cs
@@ -78,11 +78,11 @@ namespace Lucene.Net.Index
             {
                 if (success)
                 {
-                    IOUtils.Close(normsConsumer);
+                    IOUtils.Dispose(normsConsumer);
                 }
                 else
                 {
-                    IOUtils.CloseWhileHandlingException(normsConsumer);
+                    IOUtils.DisposeWhileHandlingException(normsConsumer);
                 }
             }
         }

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/7842db8a/src/Lucene.Net/Index/PersistentSnapshotDeletionPolicy.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net/Index/PersistentSnapshotDeletionPolicy.cs b/src/Lucene.Net/Index/PersistentSnapshotDeletionPolicy.cs
index 5d14564..af28bf3 100644
--- a/src/Lucene.Net/Index/PersistentSnapshotDeletionPolicy.cs
+++ b/src/Lucene.Net/Index/PersistentSnapshotDeletionPolicy.cs
@@ -224,7 +224,7 @@ namespace Lucene.Net.Index
                 {
                     if (!success)
                     {
-                        IOUtils.CloseWhileHandlingException(@out);
+                        IOUtils.DisposeWhileHandlingException(@out);
                         try
                         {
                             dir.DeleteFile(fileName);
@@ -238,7 +238,7 @@ namespace Lucene.Net.Index
                     }
                     else
                     {
-                        IOUtils.Close(@out);
+                        IOUtils.Dispose(@out);
                     }
                 }
 

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/7842db8a/src/Lucene.Net/Index/ReadersAndUpdates.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net/Index/ReadersAndUpdates.cs b/src/Lucene.Net/Index/ReadersAndUpdates.cs
index c17a4c0..06d823c 100644
--- a/src/Lucene.Net/Index/ReadersAndUpdates.cs
+++ b/src/Lucene.Net/Index/ReadersAndUpdates.cs
@@ -555,7 +555,7 @@ namespace Lucene.Net.Index
                             }
                             else
                             {
-                                IOUtils.CloseWhileHandlingException(fieldsConsumer);
+                                IOUtils.DisposeWhileHandlingException(fieldsConsumer);
                             }
                         }
                     }

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/7842db8a/src/Lucene.Net/Index/SegmentCoreReaders.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net/Index/SegmentCoreReaders.cs b/src/Lucene.Net/Index/SegmentCoreReaders.cs
index c37aea7..17c3ea8 100644
--- a/src/Lucene.Net/Index/SegmentCoreReaders.cs
+++ b/src/Lucene.Net/Index/SegmentCoreReaders.cs
@@ -250,7 +250,7 @@ namespace Lucene.Net.Index
                 Exception th = null;
                 try
                 {
-                    IOUtils.Close(termVectorsLocal, fieldsReaderLocal, normsLocal, fields, termVectorsReaderOrig, fieldsReaderOrig, cfsReader, normsProducer);
+                    IOUtils.Dispose(termVectorsLocal, fieldsReaderLocal, normsLocal, fields, termVectorsReaderOrig, fieldsReaderOrig, cfsReader, normsProducer);
                 }
                 catch (Exception throwable)
                 {

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/7842db8a/src/Lucene.Net/Index/SegmentInfos.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net/Index/SegmentInfos.cs b/src/Lucene.Net/Index/SegmentInfos.cs
index f330d11..7d6f403 100644
--- a/src/Lucene.Net/Index/SegmentInfos.cs
+++ b/src/Lucene.Net/Index/SegmentInfos.cs
@@ -447,7 +447,7 @@ namespace Lucene.Net.Index
                     // Clear any segment infos we had loaded so we
                     // have a clean slate on retry:
                     this.Clear();
-                    IOUtils.CloseWhileHandlingException(input);
+                    IOUtils.DisposeWhileHandlingException(input);
                 }
                 else
                 {
@@ -584,7 +584,7 @@ namespace Lucene.Net.Index
                 {
                     // We hit an exception above; try to close the file
                     // but suppress any exception:
-                    IOUtils.CloseWhileHandlingException(segnOutput);
+                    IOUtils.DisposeWhileHandlingException(segnOutput);
 
                     foreach (string fileName in upgradedSIFiles)
                     {
@@ -634,7 +634,7 @@ namespace Lucene.Net.Index
             {
                 if (@in != null)
                 {
-                    IOUtils.CloseWhileHandlingException(@in);
+                    IOUtils.DisposeWhileHandlingException(@in);
                 }
             }
             return false;
@@ -678,7 +678,7 @@ namespace Lucene.Net.Index
             {
                 if (!success)
                 {
-                    IOUtils.CloseWhileHandlingException(output);
+                    IOUtils.DisposeWhileHandlingException(output);
                     try
                     {
                         si.Dir.DeleteFile(fileName);
@@ -1118,7 +1118,7 @@ namespace Lucene.Net.Index
             {
                 // Suppress so we keep throwing the original exception
                 // in our caller
-                IOUtils.CloseWhileHandlingException(pendingSegnOutput);
+                IOUtils.DisposeWhileHandlingException(pendingSegnOutput);
                 pendingSegnOutput = null;
 
                 // Must carefully compute fileName from "generation"

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/7842db8a/src/Lucene.Net/Index/SegmentMerger.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net/Index/SegmentMerger.cs b/src/Lucene.Net/Index/SegmentMerger.cs
index 57e1fa7..77ce627 100644
--- a/src/Lucene.Net/Index/SegmentMerger.cs
+++ b/src/Lucene.Net/Index/SegmentMerger.cs
@@ -264,11 +264,11 @@ namespace Lucene.Net.Index
             {
                 if (success)
                 {
-                    IOUtils.Close(consumer);
+                    IOUtils.Dispose(consumer);
                 }
                 else
                 {
-                    IOUtils.CloseWhileHandlingException(consumer);
+                    IOUtils.DisposeWhileHandlingException(consumer);
                 }
             }
         }
@@ -304,11 +304,11 @@ namespace Lucene.Net.Index
             {
                 if (success)
                 {
-                    IOUtils.Close(consumer);
+                    IOUtils.Dispose(consumer);
                 }
                 else
                 {
-                    IOUtils.CloseWhileHandlingException(consumer);
+                    IOUtils.DisposeWhileHandlingException(consumer);
                 }
             }
         }
@@ -471,11 +471,11 @@ namespace Lucene.Net.Index
             {
                 if (success)
                 {
-                    IOUtils.Close(consumer);
+                    IOUtils.Dispose(consumer);
                 }
                 else
                 {
-                    IOUtils.CloseWhileHandlingException(consumer);
+                    IOUtils.DisposeWhileHandlingException(consumer);
                 }
             }
         }

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/7842db8a/src/Lucene.Net/Index/SegmentReader.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net/Index/SegmentReader.cs b/src/Lucene.Net/Index/SegmentReader.cs
index 4af36b5..d17923b 100644
--- a/src/Lucene.Net/Index/SegmentReader.cs
+++ b/src/Lucene.Net/Index/SegmentReader.cs
@@ -311,7 +311,7 @@ namespace Lucene.Net.Index
                 dvProducersByField.Clear();
                 try
                 {
-                    IOUtils.Close(docValuesLocal, docsWithFieldLocal);
+                    IOUtils.Dispose(docValuesLocal, docsWithFieldLocal);
                 }
                 finally
                 {

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/7842db8a/src/Lucene.Net/Index/StandardDirectoryReader.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net/Index/StandardDirectoryReader.cs b/src/Lucene.Net/Index/StandardDirectoryReader.cs
index 2484c68..0d78142 100644
--- a/src/Lucene.Net/Index/StandardDirectoryReader.cs
+++ b/src/Lucene.Net/Index/StandardDirectoryReader.cs
@@ -87,7 +87,7 @@ namespace Lucene.Net.Index
                     {
                         if (!success)
                         {
-                            IOUtils.CloseWhileHandlingException(prior, readers);
+                            IOUtils.DisposeWhileHandlingException(prior, readers);
                         }
                     }
                 }

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/7842db8a/src/Lucene.Net/Index/StoredFieldsProcessor.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net/Index/StoredFieldsProcessor.cs b/src/Lucene.Net/Index/StoredFieldsProcessor.cs
index bd16042..53ad45e 100644
--- a/src/Lucene.Net/Index/StoredFieldsProcessor.cs
+++ b/src/Lucene.Net/Index/StoredFieldsProcessor.cs
@@ -88,11 +88,11 @@ namespace Lucene.Net.Index
                 {
                     if (success)
                     {
-                        IOUtils.Close(fieldsWriter);
+                        IOUtils.Dispose(fieldsWriter);
                     }
                     else
                     {
-                        IOUtils.CloseWhileHandlingException(fieldsWriter);
+                        IOUtils.DisposeWhileHandlingException(fieldsWriter);
                     }
                 }
             }

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/7842db8a/src/Lucene.Net/Index/TermVectorsConsumer.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net/Index/TermVectorsConsumer.cs b/src/Lucene.Net/Index/TermVectorsConsumer.cs
index f1c8019..4179cca 100644
--- a/src/Lucene.Net/Index/TermVectorsConsumer.cs
+++ b/src/Lucene.Net/Index/TermVectorsConsumer.cs
@@ -71,7 +71,7 @@ namespace Lucene.Net.Index
                 }
                 finally
                 {
-                    IOUtils.Close(writer);
+                    IOUtils.Dispose(writer);
                     writer = null;
                     lastDocID = 0;
                     hasVectors = false;

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/7842db8a/src/Lucene.Net/Search/SearcherLifetimeManager.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net/Search/SearcherLifetimeManager.cs b/src/Lucene.Net/Search/SearcherLifetimeManager.cs
index 0090339..8b7b3d4 100644
--- a/src/Lucene.Net/Search/SearcherLifetimeManager.cs
+++ b/src/Lucene.Net/Search/SearcherLifetimeManager.cs
@@ -336,7 +336,7 @@ namespace Lucene.Net.Search
                     _searchers.TryRemove(tracker.Version, out _);
                 }
 
-                IOUtils.Close(toClose);
+                IOUtils.Dispose(toClose);
 
                 // Make some effort to catch mis-use:
                 if (_searchers.Count != 0)

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/7842db8a/src/Lucene.Net/Store/CompoundFileDirectory.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net/Store/CompoundFileDirectory.cs b/src/Lucene.Net/Store/CompoundFileDirectory.cs
index 58cca90..53682b2 100644
--- a/src/Lucene.Net/Store/CompoundFileDirectory.cs
+++ b/src/Lucene.Net/Store/CompoundFileDirectory.cs
@@ -111,7 +111,7 @@ namespace Lucene.Net.Store
                 {
                     if (!success)
                     {
-                        IOUtils.CloseWhileHandlingException(handle);
+                        IOUtils.DisposeWhileHandlingException(handle);
                     }
                 }
                 this.IsOpen = true;
@@ -204,7 +204,7 @@ namespace Lucene.Net.Store
             }
             finally
             {
-                IOUtils.CloseWhileHandlingException(priorE, stream, entriesStream);
+                IOUtils.DisposeWhileHandlingException(priorE, stream, entriesStream);
             }
             // this is needed until Java 7's real try-with-resources:
             throw new InvalidOperationException("impossible to get here");
@@ -311,7 +311,7 @@ namespace Lucene.Net.Store
                     }
                     else
                     {
-                        IOUtils.Close(handle);
+                        IOUtils.Dispose(handle);
                     }
                 }
             }

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/7842db8a/src/Lucene.Net/Store/CompoundFileWriter.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net/Store/CompoundFileWriter.cs b/src/Lucene.Net/Store/CompoundFileWriter.cs
index 380c009..245f4d3 100644
--- a/src/Lucene.Net/Store/CompoundFileWriter.cs
+++ b/src/Lucene.Net/Store/CompoundFileWriter.cs
@@ -124,7 +124,7 @@ namespace Lucene.Net.Store
                     {
                         if (!success)
                         {
-                            IOUtils.CloseWhileHandlingException(dataOut);
+                            IOUtils.DisposeWhileHandlingException(dataOut);
                         }
                     }
                 }
@@ -186,7 +186,7 @@ namespace Lucene.Net.Store
             }
             finally
             {
-                IOUtils.CloseWhileHandlingException(priorException, dataOut);
+                IOUtils.DisposeWhileHandlingException(priorException, dataOut);
             }
             try
             {
@@ -199,7 +199,7 @@ namespace Lucene.Net.Store
             }
             finally
             {
-                IOUtils.CloseWhileHandlingException(priorException, entryTableOut);
+                IOUtils.DisposeWhileHandlingException(priorException, entryTableOut);
             }
         }
 
@@ -239,13 +239,13 @@ namespace Lucene.Net.Store
             {
                 if (success)
                 {
-                    IOUtils.Close(@is);
+                    IOUtils.Dispose(@is);
                     // copy successful - delete file
                     fileEntry.Dir.DeleteFile(fileEntry.File);
                 }
                 else
                 {
-                    IOUtils.CloseWhileHandlingException(@is);
+                    IOUtils.DisposeWhileHandlingException(@is);
                 }
             }
         }

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/7842db8a/src/Lucene.Net/Store/Directory.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net/Store/Directory.cs b/src/Lucene.Net/Store/Directory.cs
index 7565b8a..7ca06b3 100644
--- a/src/Lucene.Net/Store/Directory.cs
+++ b/src/Lucene.Net/Store/Directory.cs
@@ -213,7 +213,7 @@ namespace Lucene.Net.Store
                 bool success = false;
                 try
                 {
-                    IOUtils.CloseWhileHandlingException(priorException, os, @is);
+                    IOUtils.DisposeWhileHandlingException(priorException, os, @is);
                     success = true;
                 }
                 finally

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/7842db8a/src/Lucene.Net/Store/FSDirectory.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net/Store/FSDirectory.cs b/src/Lucene.Net/Store/FSDirectory.cs
index d1cbda1..36cac51 100644
--- a/src/Lucene.Net/Store/FSDirectory.cs
+++ b/src/Lucene.Net/Store/FSDirectory.cs
@@ -507,7 +507,7 @@ namespace Lucene.Net.Store
                         finally
                         {
                             isOpen = false;
-                            IOUtils.CloseWhileHandlingException(priorE, file);
+                            IOUtils.DisposeWhileHandlingException(priorE, file);
                         }
                     }
                 }

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/7842db8a/src/Lucene.Net/Store/LockVerifyServer.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net/Store/LockVerifyServer.cs b/src/Lucene.Net/Store/LockVerifyServer.cs
index f65d243..6a22f8f 100644
--- a/src/Lucene.Net/Store/LockVerifyServer.cs
+++ b/src/Lucene.Net/Store/LockVerifyServer.cs
@@ -184,7 +184,7 @@ namespace Lucene.Net.Store
                     }
                     finally
                     {
-                        IOUtils.CloseWhileHandlingException(cs);
+                        IOUtils.DisposeWhileHandlingException(cs);
                     }
                 }
             }

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/7842db8a/src/Lucene.Net/Store/NRTCachingDirectory.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net/Store/NRTCachingDirectory.cs b/src/Lucene.Net/Store/NRTCachingDirectory.cs
index ee9f5ba..f6463b5 100644
--- a/src/Lucene.Net/Store/NRTCachingDirectory.cs
+++ b/src/Lucene.Net/Store/NRTCachingDirectory.cs
@@ -399,7 +399,7 @@ namespace Lucene.Net.Store
                 }
                 finally
                 {
-                    IOUtils.Close(@in, @out);
+                    IOUtils.Dispose(@in, @out);
                 }
 
                 // Lock order: uncacheLock -> this

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/7842db8a/src/Lucene.Net/Store/NativeFSLockFactory.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net/Store/NativeFSLockFactory.cs b/src/Lucene.Net/Store/NativeFSLockFactory.cs
index 47e6f15..3459747 100644
--- a/src/Lucene.Net/Store/NativeFSLockFactory.cs
+++ b/src/Lucene.Net/Store/NativeFSLockFactory.cs
@@ -174,7 +174,7 @@ namespace Lucene.Net.Store
                 {
                     if (!success)
                     {
-                        IOUtils.CloseWhileHandlingException(channel);
+                        IOUtils.DisposeWhileHandlingException(channel);
                         channel = null;
                     }
                 }
@@ -198,7 +198,7 @@ namespace Lucene.Net.Store
                         }
                         finally
                         {
-                            IOUtils.CloseWhileHandlingException(channel);
+                            IOUtils.DisposeWhileHandlingException(channel);
                             channel = null;
                         }
 

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/7842db8a/src/Lucene.Net/Util/Fst/FST.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net/Util/Fst/FST.cs b/src/Lucene.Net/Util/Fst/FST.cs
index e85af58..8982395 100644
--- a/src/Lucene.Net/Util/Fst/FST.cs
+++ b/src/Lucene.Net/Util/Fst/FST.cs
@@ -589,11 +589,11 @@ namespace Lucene.Net.Util.Fst
             {
                 if (success)
                 {
-                    IOUtils.Close(bs);
+                    IOUtils.Dispose(bs);
                 }
                 else
                 {
-                    IOUtils.CloseWhileHandlingException(bs);
+                    IOUtils.DisposeWhileHandlingException(bs);
                 }
             }
         }
@@ -2195,11 +2195,11 @@ namespace Lucene.Net.Util.Fst
             {
                 if (success)
                 {
-                    IOUtils.Close(bs);
+                    IOUtils.Dispose(bs);
                 }
                 else
                 {
-                    IOUtils.CloseWhileHandlingException(bs);
+                    IOUtils.DisposeWhileHandlingException(bs);
                 }
             }
         }

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/7842db8a/src/Lucene.Net/Util/IOUtils.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net/Util/IOUtils.cs b/src/Lucene.Net/Util/IOUtils.cs
index 87049da..76aa7a4 100644
--- a/src/Lucene.Net/Util/IOUtils.cs
+++ b/src/Lucene.Net/Util/IOUtils.cs
@@ -72,14 +72,104 @@ namespace Lucene.Net.Util
         /// } 
         /// finally 
         /// {
-        ///     CloseWhileHandlingException(priorE, resource1, resource2, resource3);
+        ///     IOUtils.CloseWhileHandlingException(priorE, resource1, resource2, resource3);
         /// }
         /// </code>
         /// </para> 
         /// </summary>
         /// <param name="priorException">  <c>null</c> or an exception that will be rethrown after method completion. </param>
         /// <param name="objects">         Objects to call <see cref="IDisposable.Dispose()"/> on. </param>
-        public static void CloseWhileHandlingException(Exception priorException, params IDisposable[] objects) // LUCENENET TODO: API rename DisposeWhileHandlingException()
+        [Obsolete("Use DisposeWhileHandlingException(Exception, params IDisposable[]) instead.")]
+        public static void CloseWhileHandlingException(Exception priorException, params IDisposable[] objects)
+        {
+            DisposeWhileHandlingException(priorException, objects);
+        }
+
+        /// <summary>
+        /// Disposes all given <see cref="IDisposable"/>s, suppressing all thrown exceptions. </summary>
+        /// <seealso cref="DisposeWhileHandlingException(Exception, IDisposable[])"/>
+        [Obsolete("Use DisposeWhileHandlingException(Exception, IEnumerable<IDisposable>) instead.")]
+        public static void CloseWhileHandlingException(Exception priorException, IEnumerable<IDisposable> objects)
+        {
+            DisposeWhileHandlingException(priorException, objects);
+        }
+
+        /// <summary>
+        /// Disposes all given <see cref="IDisposable"/>s.  Some of the
+        /// <see cref="IDisposable"/>s may be <c>null</c>; they are
+        /// ignored.  After everything is closed, the method either
+        /// throws the first exception it hit while closing, or
+        /// completes normally if there were no exceptions.
+        /// </summary>
+        /// <param name="objects">
+        ///          Objects to call <see cref="IDisposable.Dispose()"/> on </param>
+        [Obsolete("Use Dispose(params IDisposable[]) instead.")]
+        public static void Close(params IDisposable[] objects)
+        {
+            Dispose(objects);
+        }
+
+        /// <summary>
+        /// Disposes all given <see cref="IDisposable"/>s. </summary>
+        /// <seealso cref="Dispose(IDisposable[])"/>
+        [Obsolete("Use Dispose(IEnumerable<IDisposable>) instead.")]
+        public static void Close(IEnumerable<IDisposable> objects)
+        {
+            Dispose(objects);
+        }
+
+        /// <summary>
+        /// Disposes all given <see cref="IDisposable"/>s, suppressing all thrown exceptions.
+        /// Some of the <see cref="IDisposable"/>s may be <c>null</c>, they are ignored.
+        /// </summary>
+        /// <param name="objects">
+        ///          Objects to call <see cref="IDisposable.Dispose()"/> on </param>
+        [Obsolete("Use DisposeWhileHandlingException(params IDisposable[]) instead.")]
+        public static void CloseWhileHandlingException(params IDisposable[] objects)
+        {
+            DisposeWhileHandlingException(objects);
+        }
+
+        /// <summary>
+        /// Disposes all given <see cref="IDisposable"/>s, suppressing all thrown exceptions. </summary>
+        /// <seealso cref="DisposeWhileHandlingException(IEnumerable{IDisposable})"/>
+        /// <seealso cref="DisposeWhileHandlingException(IDisposable[])"/>
+        [Obsolete("Use DisposeWhileHandlingException(IEnumerable<IDisposable>) instead.")]
+        public static void CloseWhileHandlingException(IEnumerable<IDisposable> objects)
+        {
+            DisposeWhileHandlingException(objects);
+        }
+
+
+        // LUCENENET specific - added overloads starting with Dispose... instead of Close...
+
+        /// <summary>
+        /// <para>Disposes all given <c>IDisposable</c>s, suppressing all thrown exceptions. Some of the <c>IDisposable</c>s
+        /// may be <c>null</c>, they are ignored. After everything is disposed, method either throws <paramref name="priorException"/>,
+        /// if one is supplied, or the first of suppressed exceptions, or completes normally.</para>
+        /// <para>Sample usage:
+        /// <code>
+        /// IDisposable resource1 = null, resource2 = null, resource3 = null;
+        /// ExpectedException priorE = null;
+        /// try 
+        /// {
+        ///     resource1 = ...; resource2 = ...; resource3 = ...; // Acquisition may throw ExpectedException
+        ///     ..do..stuff.. // May throw ExpectedException
+        /// } 
+        /// catch (ExpectedException e) 
+        /// {
+        ///     priorE = e;
+        /// } 
+        /// finally 
+        /// {
+        ///     IOUtils.DisposeWhileHandlingException(priorE, resource1, resource2, resource3);
+        /// }
+        /// </code>
+        /// </para> 
+        /// </summary>
+        /// <param name="priorException">  <c>null</c> or an exception that will be rethrown after method completion. </param>
+        /// <param name="objects">         Objects to call <see cref="IDisposable.Dispose()"/> on. </param>
+        public static void DisposeWhileHandlingException(Exception priorException, params IDisposable[] objects)
         {
             Exception th = null;
 
@@ -114,8 +204,8 @@ namespace Lucene.Net.Util
 
         /// <summary>
         /// Disposes all given <see cref="IDisposable"/>s, suppressing all thrown exceptions. </summary>
-        /// <seealso cref="CloseWhileHandlingException(Exception, IDisposable[])"/>
-        public static void CloseWhileHandlingException(Exception priorException, IEnumerable<IDisposable> objects) // LUCENENET TODO: API rename DisposeWhileHandlingException()
+        /// <seealso cref="DisposeWhileHandlingException(Exception, IDisposable[])"/>
+        public static void DisposeWhileHandlingException(Exception priorException, IEnumerable<IDisposable> objects) 
         {
             Exception th = null;
 
@@ -157,7 +247,7 @@ namespace Lucene.Net.Util
         /// </summary>
         /// <param name="objects">
         ///          Objects to call <see cref="IDisposable.Dispose()"/> on </param>
-        public static void Close(params IDisposable[] objects) // LUCENENET TODO: API rename Dispose()
+        public static void Dispose(params IDisposable[] objects) 
         {
             Exception th = null;
 
@@ -185,8 +275,8 @@ namespace Lucene.Net.Util
 
         /// <summary>
         /// Disposes all given <see cref="IDisposable"/>s. </summary>
-        /// <seealso cref="Close(IDisposable[])"/>
-        public static void Close(IEnumerable<IDisposable> objects) // LUCENENET TODO: API rename Dispose()
+        /// <seealso cref="Dispose(IDisposable[])"/>
+        public static void Dispose(IEnumerable<IDisposable> objects)
         {
             Exception th = null;
 
@@ -218,7 +308,7 @@ namespace Lucene.Net.Util
         /// </summary>
         /// <param name="objects">
         ///          Objects to call <see cref="IDisposable.Dispose()"/> on </param>
-        public static void CloseWhileHandlingException(params IDisposable[] objects) // LUCENENET TODO: API rename DisposeWhileHandlingException()
+        public static void DisposeWhileHandlingException(params IDisposable[] objects) 
         {
             foreach (var o in objects)
             {
@@ -238,8 +328,8 @@ namespace Lucene.Net.Util
 
         /// <summary>
         /// Disposes all given <see cref="IDisposable"/>s, suppressing all thrown exceptions. </summary>
-        /// <seealso cref="CloseWhileHandlingException(IDisposable[])"/>
-        public static void CloseWhileHandlingException(IEnumerable<IDisposable> objects) // LUCENENET TODO: API rename DisposeWhileHandlingException()
+        /// <seealso cref="DisposeWhileHandlingException(IDisposable[])"/>
+        public static void DisposeWhileHandlingException(IEnumerable<IDisposable> objects)
         {
             foreach (IDisposable @object in objects)
             {
@@ -318,7 +408,7 @@ namespace Lucene.Net.Util
             {
                 if (!success)
                 {
-                    IOUtils.Close(stream);
+                    IOUtils.Dispose(stream);
                 }
             }
         }
@@ -350,7 +440,7 @@ namespace Lucene.Net.Util
             {
                 if (!success)
                 {
-                    IOUtils.Close(stream);
+                    IOUtils.Dispose(stream);
                 }
             }
         }
@@ -397,7 +487,7 @@ namespace Lucene.Net.Util
             }
             finally
             {
-                Close(fis, fos);
+                Dispose(fis, fos);
             }
         }
 

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/7842db8a/src/Lucene.Net/Util/OfflineSorter.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net/Util/OfflineSorter.cs b/src/Lucene.Net/Util/OfflineSorter.cs
index bce5f2e..91dc2c0 100644
--- a/src/Lucene.Net/Util/OfflineSorter.cs
+++ b/src/Lucene.Net/Util/OfflineSorter.cs
@@ -296,11 +296,11 @@ namespace Lucene.Net.Util
                 {
                     if (success)
                     {
-                        IOUtils.Close(inputStream);
+                        IOUtils.Dispose(inputStream);
                     }
                     else
                     {
-                        IOUtils.CloseWhileHandlingException(inputStream);
+                        IOUtils.DisposeWhileHandlingException(inputStream);
                     }
                 }
 
@@ -442,11 +442,11 @@ namespace Lucene.Net.Util
                 // happening in closing streams.
                 try
                 {
-                    IOUtils.Close(streams);
+                    IOUtils.Dispose(streams);
                 }
                 finally
                 {
-                    IOUtils.Close(@out);
+                    IOUtils.Dispose(@out);
                 }
             }
         }

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/7842db8a/src/Lucene.Net/Util/QueryBuilder.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net/Util/QueryBuilder.cs b/src/Lucene.Net/Util/QueryBuilder.cs
index 286b4e2..8abe1cb 100644
--- a/src/Lucene.Net/Util/QueryBuilder.cs
+++ b/src/Lucene.Net/Util/QueryBuilder.cs
@@ -258,7 +258,7 @@ namespace Lucene.Net.Util
             }
             finally
             {
-                IOUtils.CloseWhileHandlingException(source);
+                IOUtils.DisposeWhileHandlingException(source);
             }
 
             // rewind the buffer stream


Mime
View raw message