lucenenet-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From nightowl...@apache.org
Subject [02/11] lucenenet git commit: SWEEP: Lucene.Net.Core: Reviewed all strings and fixed collections to print their contents. Also fixed several other string formatting issues.
Date Sat, 25 Mar 2017 06:11:16 GMT
SWEEP: Lucene.Net.Core: Reviewed all strings and fixed collections to print their contents.
Also fixed several other string formatting issues.


Project: http://git-wip-us.apache.org/repos/asf/lucenenet/repo
Commit: http://git-wip-us.apache.org/repos/asf/lucenenet/commit/75df5756
Tree: http://git-wip-us.apache.org/repos/asf/lucenenet/tree/75df5756
Diff: http://git-wip-us.apache.org/repos/asf/lucenenet/diff/75df5756

Branch: refs/heads/api-work
Commit: 75df5756110aafc297aa9fcc597dd7fc860e3baa
Parents: ed649a1
Author: Shad Storhaug <shad@shadstorhaug.com>
Authored: Sat Mar 25 02:10:27 2017 +0700
Committer: Shad Storhaug <shad@shadstorhaug.com>
Committed: Sat Mar 25 02:10:27 2017 +0700

----------------------------------------------------------------------
 src/Lucene.Net.Core/Codecs/BlockTreeTermsWriter.cs    |  6 ++++--
 .../Codecs/Lucene40/Lucene40TermVectorsWriter.cs      |  4 ++--
 .../Index/BinaryDocValuesFieldUpdates.cs              |  4 ++--
 src/Lucene.Net.Core/Index/CheckIndex.cs               |  8 ++++----
 src/Lucene.Net.Core/Index/DocValuesFieldUpdates.cs    |  3 ++-
 src/Lucene.Net.Core/Index/DocumentsWriter.cs          |  2 +-
 src/Lucene.Net.Core/Index/IndexWriter.cs              |  6 +++---
 src/Lucene.Net.Core/Index/LogMergePolicy.cs           |  6 +++---
 .../Index/NumericDocValuesFieldUpdates.cs             |  4 ++--
 src/Lucene.Net.Core/Index/ParallelAtomicReader.cs     |  2 +-
 src/Lucene.Net.Core/Index/ParallelCompositeReader.cs  |  2 +-
 src/Lucene.Net.Core/Index/ReadersAndUpdates.cs        |  2 +-
 src/Lucene.Net.Core/Index/TieredMergePolicy.cs        | 14 +++++++-------
 .../Search/ControlledRealTimeReopenThread.cs          |  2 +-
 src/Lucene.Net.Core/Search/DocIdSetIterator.cs        |  2 +-
 src/Lucene.Net.Core/Search/NumericRangeQuery.cs       |  4 ++--
 src/Lucene.Net.Core/Search/Sort.cs                    |  2 +-
 src/Lucene.Net.Core/Store/ByteBufferIndexInput.cs     |  2 +-
 src/Lucene.Net.Core/Store/CompoundFileDirectory.cs    |  2 +-
 src/Lucene.Net.Core/Store/FSDirectory.cs              |  4 ++--
 src/Lucene.Net.Core/Support/AtomicInteger.cs          |  5 +++++
 src/Lucene.Net.Core/Support/AtomicLong.cs             |  5 +++++
 src/Lucene.Net.Core/Util/ArrayUtil.cs                 |  2 +-
 src/Lucene.Net.Core/Util/Fst/BytesStore.cs            |  2 +-
 src/Lucene.Net.Core/Util/PForDeltaDocIdSet.cs         |  2 +-
 src/Lucene.Net.Core/Util/Packed/EliasFanoEncoder.cs   |  6 +++---
 src/Lucene.Net.Core/Util/WAH8DocIdSet.cs              |  2 +-
 src/Lucene.Net.Facet/DrillSidewaysScorer.cs           |  2 +-
 .../SortedSet/DefaultSortedSetDocValuesReaderState.cs |  2 +-
 .../PostingsHighlight/PostingsHighlighter.cs          |  2 +-
 30 files changed, 62 insertions(+), 49 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/lucenenet/blob/75df5756/src/Lucene.Net.Core/Codecs/BlockTreeTermsWriter.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Core/Codecs/BlockTreeTermsWriter.cs b/src/Lucene.Net.Core/Codecs/BlockTreeTermsWriter.cs
index 62b2454..ea0a46a 100644
--- a/src/Lucene.Net.Core/Codecs/BlockTreeTermsWriter.cs
+++ b/src/Lucene.Net.Core/Codecs/BlockTreeTermsWriter.cs
@@ -433,7 +433,9 @@ namespace Lucene.Net.Codecs
 
             public void CompileIndex(IList<PendingBlock> floorBlocks, RAMOutputStream
scratchBytes)
             {
-                Debug.Assert((IsFloor && floorBlocks != null && floorBlocks.Count
!= 0) || (!IsFloor && floorBlocks == null), "isFloor=" + IsFloor + " floorBlocks="
+ floorBlocks);
+                // LUCENENET TODO: floorBlocks cannot be converted using Arrays.ToString()
here.
+                // It generates an IndexOutOfRangeException()
+                Debug.Assert((IsFloor && floorBlocks != null && floorBlocks.Count
!= 0) || (!IsFloor && floorBlocks == null), "isFloor=" + IsFloor + " floorBlocks="
+ floorBlocks /*Arrays.ToString(floorBlocks)*/); 
 
                 Debug.Assert(scratchBytes.GetFilePointer() == 0);
 
@@ -880,7 +882,7 @@ namespace Lucene.Net.Codecs
 
                 int start = pending.Count - startBackwards;
 
-                Debug.Assert(start >= 0, "pending.size()=" + pending.Count + " startBackwards="
+ startBackwards + " length=" + length);
+                Debug.Assert(start >= 0, "pending.Count=" + pending.Count + " startBackwards="
+ startBackwards + " length=" + length);
 
                 IList<PendingEntry> slice = pending.SubList(start, start + length);
 

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/75df5756/src/Lucene.Net.Core/Codecs/Lucene40/Lucene40TermVectorsWriter.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Core/Codecs/Lucene40/Lucene40TermVectorsWriter.cs b/src/Lucene.Net.Core/Codecs/Lucene40/Lucene40TermVectorsWriter.cs
index 43d1f0d..41bc759 100644
--- a/src/Lucene.Net.Core/Codecs/Lucene40/Lucene40TermVectorsWriter.cs
+++ b/src/Lucene.Net.Core/Codecs/Lucene40/Lucene40TermVectorsWriter.cs
@@ -304,8 +304,8 @@ namespace Lucene.Net.Codecs.Lucene40
                     if (payloadLength + payloadData.Length < 0)
                     {
                         // we overflowed the payload buffer, just throw UOE
-                        // having > Integer.MAX_VALUE bytes of payload for a single term
in a single doc is nuts.
-                        throw new System.NotSupportedException("A term cannot have more than
Integer.MAX_VALUE bytes of payload data in a single document");
+                        // having > System.Int32.MaxValue bytes of payload for a single
term in a single doc is nuts.
+                        throw new System.NotSupportedException("A term cannot have more than
System.Int32.MaxValue bytes of payload data in a single document");
                     }
                     payloadData.Append(payload);
                 }

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/75df5756/src/Lucene.Net.Core/Index/BinaryDocValuesFieldUpdates.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Core/Index/BinaryDocValuesFieldUpdates.cs b/src/Lucene.Net.Core/Index/BinaryDocValuesFieldUpdates.cs
index af861da..d8648cf 100644
--- a/src/Lucene.Net.Core/Index/BinaryDocValuesFieldUpdates.cs
+++ b/src/Lucene.Net.Core/Index/BinaryDocValuesFieldUpdates.cs
@@ -142,7 +142,7 @@ namespace Lucene.Net.Index
             // TODO: if the Sorter interface changes to take long indexes, we can remove
that limitation
             if (size == int.MaxValue)
             {
-                throw new InvalidOperationException("cannot support more than Integer.MAX_VALUE
doc/value entries");
+                throw new InvalidOperationException("cannot support more than System.Int32.MaxValue
doc/value entries");
             }
 
             BytesRef val = (BytesRef)value;
@@ -250,7 +250,7 @@ namespace Lucene.Net.Index
             int newSize = size + otherUpdates.size;
             if (newSize > int.MaxValue)
             {
-                throw new InvalidOperationException("cannot support more than Integer.MAX_VALUE
doc/value entries; size=" + size + " other.size=" + otherUpdates.size);
+                throw new InvalidOperationException("cannot support more than System.Int32.MaxValue
doc/value entries; size=" + size + " other.size=" + otherUpdates.size);
             }
             docs = docs.Grow(newSize);
             offsets = offsets.Grow(newSize);

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/75df5756/src/Lucene.Net.Core/Index/CheckIndex.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Core/Index/CheckIndex.cs b/src/Lucene.Net.Core/Index/CheckIndex.cs
index 1f1f999..182b906 100644
--- a/src/Lucene.Net.Core/Index/CheckIndex.cs
+++ b/src/Lucene.Net.Core/Index/CheckIndex.cs
@@ -1407,7 +1407,7 @@ namespace Lucene.Net.Index
                                 }
                                 if (nextDocID <= docID)
                                 {
-                                    throw new Exception("term " + term + ": advance(docID="
+ skipDocID + "), then .next() returned docID=" + nextDocID + " vs prev docID=" + docID);
+                                    throw new Exception("term " + term + ": Advance(docID="
+ skipDocID + "), then .Next() returned docID=" + nextDocID + " vs prev docID=" + docID);
                                 }
                             }
                         }
@@ -1427,7 +1427,7 @@ namespace Lucene.Net.Index
                             {
                                 if (docID < skipDocID)
                                 {
-                                    throw new Exception("term " + term + ": advance(docID="
+ skipDocID + ") returned docID=" + docID);
+                                    throw new Exception("term " + term + ": Advance(docID="
+ skipDocID + ") returned docID=" + docID);
                                 }
                                 int nextDocID = docs.NextDoc();
                                 if (nextDocID == DocIdSetIterator.NO_MORE_DOCS)
@@ -1436,7 +1436,7 @@ namespace Lucene.Net.Index
                                 }
                                 if (nextDocID <= docID)
                                 {
-                                    throw new Exception("term " + term + ": advance(docID="
+ skipDocID + "), then .next() returned docID=" + nextDocID + " vs prev docID=" + docID);
+                                    throw new Exception("term " + term + ": Advance(docID="
+ skipDocID + "), then .Next() returned docID=" + nextDocID + " vs prev docID=" + docID);
                                 }
                             }
                         }
@@ -1852,7 +1852,7 @@ namespace Lucene.Net.Index
             }
             if (seenOrds.Cardinality() != dv.ValueCount)
             {
-                throw new Exception("dv for field: " + fieldName + " has holes in its ords,
valueCount=" + dv.ValueCount + " but only used: " + seenOrds.Cardinality());
+                throw new Exception("dv for field: " + fieldName + " has holes in its ords,
ValueCount=" + dv.ValueCount + " but only used: " + seenOrds.Cardinality());
             }
             BytesRef lastValue = null;
             BytesRef scratch = new BytesRef();

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/75df5756/src/Lucene.Net.Core/Index/DocValuesFieldUpdates.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Core/Index/DocValuesFieldUpdates.cs b/src/Lucene.Net.Core/Index/DocValuesFieldUpdates.cs
index c306d68..d4943eb 100644
--- a/src/Lucene.Net.Core/Index/DocValuesFieldUpdates.cs
+++ b/src/Lucene.Net.Core/Index/DocValuesFieldUpdates.cs
@@ -1,3 +1,4 @@
+using Lucene.Net.Support;
 using System.Collections.Generic;
 using System.Diagnostics;
 
@@ -133,7 +134,7 @@ namespace Lucene.Net.Index
 
             public override string ToString()
             {
-                return "numericDVUpdates=" + numericDVUpdates + " binaryDVUpdates=" + binaryDVUpdates;
+                return "numericDVUpdates=" + Arrays.ToString(numericDVUpdates) + " binaryDVUpdates="
+ Arrays.ToString(binaryDVUpdates);
             }
         }
 

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/75df5756/src/Lucene.Net.Core/Index/DocumentsWriter.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Core/Index/DocumentsWriter.cs b/src/Lucene.Net.Core/Index/DocumentsWriter.cs
index d8175a5..02cdd6f 100644
--- a/src/Lucene.Net.Core/Index/DocumentsWriter.cs
+++ b/src/Lucene.Net.Core/Index/DocumentsWriter.cs
@@ -283,7 +283,7 @@ namespace Lucene.Net.Index
                 {
                     if (infoStream.IsEnabled("DW"))
                     {
-                        infoStream.Message("DW", "done abort; abortedFiles=" + newFilesSet
+ " success=" + success);
+                        infoStream.Message("DW", "done abort; abortedFiles=" + Arrays.ToString(newFilesSet)
+ " success=" + success);
                     }
                 }
             }

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/75df5756/src/Lucene.Net.Core/Index/IndexWriter.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Core/Index/IndexWriter.cs b/src/Lucene.Net.Core/Index/IndexWriter.cs
index 710761d..2420209 100644
--- a/src/Lucene.Net.Core/Index/IndexWriter.cs
+++ b/src/Lucene.Net.Core/Index/IndexWriter.cs
@@ -3469,7 +3469,7 @@ namespace Lucene.Net.Index
                         continue;
                     }
 
-                    Debug.Assert(!SlowFileExists(directory, newFileName), "file \"" + newFileName
+ "\" already exists; siFiles=" + siFiles);
+                    Debug.Assert(!SlowFileExists(directory, newFileName), "file \"" + newFileName
+ "\" already exists; siFiles=" + Arrays.ToString(siFiles));
                     Debug.Assert(!copiedFiles.Contains(file), "file \"" + file + "\" is being
copied more than once");
                     copiedFiles.Add(file);
                     info.Info.Dir.Copy(directory, file, newFileName, context);
@@ -5465,7 +5465,7 @@ namespace Lucene.Net.Index
             {
                 if (infoStream.IsEnabled("IW"))
                 {
-                    infoStream.Message("IW", "startCommit(): start");
+                    infoStream.Message("IW", "StartCommit(): start");
                 }
 
                 lock (this)
@@ -5476,7 +5476,7 @@ namespace Lucene.Net.Index
                     {
                         if (infoStream.IsEnabled("IW"))
                         {
-                            infoStream.Message("IW", "  skip startCommit(): no changes pending");
+                            infoStream.Message("IW", "  skip StartCommit(): no changes pending");
                         }
                         deleter.DecRef(filesToCommit);
                         filesToCommit = null;

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/75df5756/src/Lucene.Net.Core/Index/LogMergePolicy.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Core/Index/LogMergePolicy.cs b/src/Lucene.Net.Core/Index/LogMergePolicy.cs
index 581da8b..5b50c63 100644
--- a/src/Lucene.Net.Core/Index/LogMergePolicy.cs
+++ b/src/Lucene.Net.Core/Index/LogMergePolicy.cs
@@ -390,7 +390,7 @@ namespace Lucene.Net.Index
             Debug.Assert(maxNumSegments > 0);
             if (IsVerbose)
             {
-                Message("findForcedMerges: maxNumSegs=" + maxNumSegments + " segsToMerge="
+ segmentsToMerge);
+                Message("findForcedMerges: maxNumSegs=" + maxNumSegments + " segsToMerge="
+ Arrays.ToString(segmentsToMerge));
             }
 
             // If the segments are already merged (e.g. there's only 1 segment), or
@@ -666,7 +666,7 @@ namespace Lucene.Net.Index
                 }
                 if (IsVerbose)
                 {
-                    Message("  level " + levelBottom + " to " + maxLevel + ": " + (1 + upto
- start) + " segments");
+                    Message("  level " + levelBottom.ToString("0.0") + " to " + maxLevel.ToString("0.0")
+ ": " + (1 + upto - start) + " segments");
                 }
 
                 // Finally, record all merges that are viable at this level:
@@ -732,7 +732,7 @@ namespace Lucene.Net.Index
         /// are best for batched indexing and speedier
         /// searches.</p>
         ///
-        /// <p>The default value is <seealso cref="Integer#MAX_VALUE"/>.</p>
+        /// <p>The default value is <see cref="int.MaxValue"/>.</p>
         ///
         /// <p>The default merge policy ({@link
         /// LogByteSizeMergePolicy}) also allows you to set this

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/75df5756/src/Lucene.Net.Core/Index/NumericDocValuesFieldUpdates.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Core/Index/NumericDocValuesFieldUpdates.cs b/src/Lucene.Net.Core/Index/NumericDocValuesFieldUpdates.cs
index 26aed5d..a00636e 100644
--- a/src/Lucene.Net.Core/Index/NumericDocValuesFieldUpdates.cs
+++ b/src/Lucene.Net.Core/Index/NumericDocValuesFieldUpdates.cs
@@ -117,7 +117,7 @@ namespace Lucene.Net.Index
             // TODO: if the Sorter interface changes to take long indexes, we can remove
that limitation
             if (size == int.MaxValue)
             {
-                throw new InvalidOperationException("cannot support more than Integer.MAX_VALUE
doc/value entries");
+                throw new InvalidOperationException("cannot support more than System.Int32.MaxValue
doc/value entries");
             }
 
             long? val = (long?)value;
@@ -214,7 +214,7 @@ namespace Lucene.Net.Index
             NumericDocValuesFieldUpdates otherUpdates = (NumericDocValuesFieldUpdates)other;
             if (size + otherUpdates.size > int.MaxValue)
             {
-                throw new InvalidOperationException("cannot support more than Integer.MAX_VALUE
doc/value entries; size=" + size + " other.size=" + otherUpdates.size);
+                throw new InvalidOperationException("cannot support more than System.Int32.MaxValue
doc/value entries; size=" + size + " other.size=" + otherUpdates.size);
             }
             docs = docs.Grow(size + otherUpdates.size);
             values = values.Grow(size + otherUpdates.size);

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/75df5756/src/Lucene.Net.Core/Index/ParallelAtomicReader.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Core/Index/ParallelAtomicReader.cs b/src/Lucene.Net.Core/Index/ParallelAtomicReader.cs
index 7b39319..8e23eec 100644
--- a/src/Lucene.Net.Core/Index/ParallelAtomicReader.cs
+++ b/src/Lucene.Net.Core/Index/ParallelAtomicReader.cs
@@ -116,7 +116,7 @@ namespace Lucene.Net.Index
             {
                 if (reader.MaxDoc != maxDoc)
                 {
-                    throw new System.ArgumentException("All readers must have same maxDoc:
" + maxDoc + "!=" + reader.MaxDoc);
+                    throw new System.ArgumentException("All readers must have same MaxDoc:
" + maxDoc + "!=" + reader.MaxDoc);
                 }
             }
 

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/75df5756/src/Lucene.Net.Core/Index/ParallelCompositeReader.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Core/Index/ParallelCompositeReader.cs b/src/Lucene.Net.Core/Index/ParallelCompositeReader.cs
index fd6aaac..7eb2453 100644
--- a/src/Lucene.Net.Core/Index/ParallelCompositeReader.cs
+++ b/src/Lucene.Net.Core/Index/ParallelCompositeReader.cs
@@ -193,7 +193,7 @@ namespace Lucene.Net.Index
                 IList<IndexReader> subs = reader.GetSequentialSubReaders();
                 if (reader.MaxDoc != maxDoc)
                 {
-                    throw new System.ArgumentException("All readers must have same maxDoc:
" + maxDoc + "!=" + reader.MaxDoc);
+                    throw new System.ArgumentException("All readers must have same MaxDoc:
" + maxDoc + "!=" + reader.MaxDoc);
                 }
                 int noSubs = subs.Count;
                 if (noSubs != childMaxDoc.Length)

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/75df5756/src/Lucene.Net.Core/Index/ReadersAndUpdates.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Core/Index/ReadersAndUpdates.cs b/src/Lucene.Net.Core/Index/ReadersAndUpdates.cs
index 2d669bd..3343ca7 100644
--- a/src/Lucene.Net.Core/Index/ReadersAndUpdates.cs
+++ b/src/Lucene.Net.Core/Index/ReadersAndUpdates.cs
@@ -150,7 +150,7 @@ namespace Lucene.Net.Index
                     count = Info.Info.DocCount;
                 }
 
-                Debug.Assert(Info.Info.DocCount - Info.DelCount - pendingDeleteCount == count,
"info.docCount=" + Info.Info.DocCount + " info.getDelCount()=" + Info.DelCount + " pendingDeleteCount="
+ pendingDeleteCount + " count=" + count);
+                Debug.Assert(Info.Info.DocCount - Info.DelCount - pendingDeleteCount == count,
"info.docCount=" + Info.Info.DocCount + " info.DelCount=" + Info.DelCount + " pendingDeleteCount="
+ pendingDeleteCount + " count=" + count);
                 return true;
             }
         }

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/75df5756/src/Lucene.Net.Core/Index/TieredMergePolicy.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Core/Index/TieredMergePolicy.cs b/src/Lucene.Net.Core/Index/TieredMergePolicy.cs
index f3fc743..cd788db 100644
--- a/src/Lucene.Net.Core/Index/TieredMergePolicy.cs
+++ b/src/Lucene.Net.Core/Index/TieredMergePolicy.cs
@@ -158,7 +158,7 @@ namespace Lucene.Net.Index
             {
                 if (value < 0.0)
                 {
-                    throw new System.ArgumentException("maxMergedSegmentMB must be >=0
(got " + value + ")");
+                    throw new System.ArgumentException("maxMergedSegmentMB must be >=0
(got " + value.ToString("0.0") + ")");
                 }
                 value *= 1024 * 1024;
                 maxMergedSegmentBytes = (value > long.MaxValue) ? long.MaxValue : (long)value;
@@ -184,7 +184,7 @@ namespace Lucene.Net.Index
             {
                 if (value < 0.0)
                 {
-                    throw new System.ArgumentException("reclaimDeletesWeight must be >=
0.0 (got " + value + ")");
+                    throw new System.ArgumentException("reclaimDeletesWeight must be >=
0.0 (got " + value.ToString("0.0") + ")");
                 }
                 reclaimDeletesWeight = value;
             }
@@ -207,7 +207,7 @@ namespace Lucene.Net.Index
             {
                 if (value <= 0.0)
                 {
-                    throw new System.ArgumentException("floorSegmentMB must be >= 0.0
(got " + value + ")");
+                    throw new System.ArgumentException("floorSegmentMB must be >= 0.0
(got " + value.ToString("0.0") + ")");
                 }
                 value *= 1024 * 1024;
                 floorSegmentBytes = (value > long.MaxValue) ? long.MaxValue : (long)value;
@@ -229,7 +229,7 @@ namespace Lucene.Net.Index
             {
                 if (value < 0.0 || value > 100.0)
                 {
-                    throw new System.ArgumentException("forceMergeDeletesPctAllowed must
be between 0.0 and 100.0 inclusive (got " + value + ")");
+                    throw new System.ArgumentException("forceMergeDeletesPctAllowed must
be between 0.0 and 100.0 inclusive (got " + value.ToString("0.0") + ")");
                 }
                 forceMergeDeletesPctAllowed = value;
             }
@@ -255,7 +255,7 @@ namespace Lucene.Net.Index
             {
                 if (value < 2.0)
                 {
-                    throw new System.ArgumentException("segmentsPerTier must be >= 2.0
(got " + value + ")");
+                    throw new System.ArgumentException("segmentsPerTier must be >= 2.0
(got " + value.ToString("0.0") + ")");
                 }
                 segsPerTier = value;
             }
@@ -594,7 +594,7 @@ namespace Lucene.Net.Index
             {
                 get
                 {
-                    return "skew=" + string.Format(CultureInfo.InvariantCulture, "%.3f",
skew) + " nonDelRatio=" + string.Format(CultureInfo.InvariantCulture, "%.3f", nonDelRatio);
+                    return "skew=" + string.Format(CultureInfo.InvariantCulture, "{0:F3}",
skew) + " nonDelRatio=" + string.Format(CultureInfo.InvariantCulture, "{0:F3}", nonDelRatio);
                 }
             }
         }
@@ -603,7 +603,7 @@ namespace Lucene.Net.Index
         {
             if (Verbose())
             {
-                Message("findForcedMerges maxSegmentCount=" + maxSegmentCount + " infos="
+ m_writer.Get().SegString(infos.Segments) + " segmentsToMerge=" + segmentsToMerge);
+                Message("FindForcedMerges maxSegmentCount=" + maxSegmentCount + " infos="
+ m_writer.Get().SegString(infos.Segments) + " segmentsToMerge=" + Arrays.ToString(segmentsToMerge));
             }
 
             List<SegmentCommitInfo> eligible = new List<SegmentCommitInfo>();

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/75df5756/src/Lucene.Net.Core/Search/ControlledRealTimeReopenThread.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Core/Search/ControlledRealTimeReopenThread.cs b/src/Lucene.Net.Core/Search/ControlledRealTimeReopenThread.cs
index 79fb237..bfb3bb0 100644
--- a/src/Lucene.Net.Core/Search/ControlledRealTimeReopenThread.cs
+++ b/src/Lucene.Net.Core/Search/ControlledRealTimeReopenThread.cs
@@ -74,7 +74,7 @@ namespace Lucene.Net.Search
         {
             if (targetMaxStaleSec < targetMinStaleSec)
             {
-                throw new System.ArgumentException("targetMaxScaleSec (= " + targetMaxStaleSec
+ ") < targetMinStaleSec (=" + targetMinStaleSec + ")");
+                throw new System.ArgumentException("targetMaxScaleSec (= " + targetMaxStaleSec.ToString("0.0")
+ ") < targetMinStaleSec (=" + targetMinStaleSec.ToString("0.0") + ")");
             }
             this.writer = writer;
             this.manager = manager;

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/75df5756/src/Lucene.Net.Core/Search/DocIdSetIterator.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Core/Search/DocIdSetIterator.cs b/src/Lucene.Net.Core/Search/DocIdSetIterator.cs
index c379e32..adbbd9d 100644
--- a/src/Lucene.Net.Core/Search/DocIdSetIterator.cs
+++ b/src/Lucene.Net.Core/Search/DocIdSetIterator.cs
@@ -24,7 +24,7 @@ namespace Lucene.Net.Search
     /// doc ids. Note that this class assumes it iterates on doc Ids, and therefore
     /// <seealso cref="#NO_MORE_DOCS"/> is set to {@value #NO_MORE_DOCS} in order to
be used as
     /// a sentinel object. Implementations of this class are expected to consider
-    /// <seealso cref="Integer#MAX_VALUE"/> as an invalid value.
+    /// <see cref="int.MaxValue"/> as an invalid value.
     /// </summary>
     public abstract class DocIdSetIterator
     {

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/75df5756/src/Lucene.Net.Core/Search/NumericRangeQuery.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Core/Search/NumericRangeQuery.cs b/src/Lucene.Net.Core/Search/NumericRangeQuery.cs
index add3770..e59899c 100644
--- a/src/Lucene.Net.Core/Search/NumericRangeQuery.cs
+++ b/src/Lucene.Net.Core/Search/NumericRangeQuery.cs
@@ -140,10 +140,10 @@ namespace Lucene.Net.Search
     ///  <li>Ideal value in most cases for <em>64 bit</em> data types <em>(long,
double)</em> is <b>6</b> or <b>8</b>.
     ///  <li>Ideal value in most cases for <em>32 bit</em> data types <em>(int,
float)</em> is <b>4</b>.
     ///  <li>For low cardinality fields larger precision steps are good. If the cardinality
is &lt; 100, it is
-    ///  fair to use <seealso cref="Integer#MAX_VALUE"/> (see below).
+    ///  fair to use <seealso cref="int.MaxValue"/> (see below).
     ///  <li>Steps <b>&gt;=64</b> for <em>long/double</em>
and <b>&gt;=32</b> for <em>int/float</em> produces one token
     ///  per value in the index and querying is as slow as a conventional <seealso cref="TermRangeQuery"/>.
But it can be used
-    ///  to produce fields, that are solely used for sorting (in this case simply use <seealso
cref="Integer#MAX_VALUE"/> as
+    ///  to produce fields, that are solely used for sorting (in this case simply use <seealso
cref="int.MaxValue"/> as
     ///  <code>precisionStep</code>). Using <seealso cref="Int32Field"/>,
     ///  <seealso cref="Int64Field"/>, <seealso cref="SingleField"/> or <seealso
cref="DoubleField"/> for sorting
     ///  is ideal, because building the field cache is much faster than with text-only numbers.

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/75df5756/src/Lucene.Net.Core/Search/Sort.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Core/Search/Sort.cs b/src/Lucene.Net.Core/Search/Sort.cs
index 0534c7a..9d92df0 100644
--- a/src/Lucene.Net.Core/Search/Sort.cs
+++ b/src/Lucene.Net.Core/Search/Sort.cs
@@ -42,7 +42,7 @@ namespace Lucene.Net.Search
     ///
     /// <p>Integer term values should contain only digits and an optional
     /// preceding negative sign.  Values must be base 10 and in the range
-    /// <code>Integer.MIN_VALUE</code> and <code>Integer.MAX_VALUE</code>
inclusive.
+    /// <see cref="int.MinValue"/> and <see cref="int.MaxValue"/> inclusive.
     /// Documents which should appear first in the sort
     /// should have low value integers, later documents high values
     /// (i.e. the documents should be numbered <code>1..n</code> where

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/75df5756/src/Lucene.Net.Core/Store/ByteBufferIndexInput.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Core/Store/ByteBufferIndexInput.cs b/src/Lucene.Net.Core/Store/ByteBufferIndexInput.cs
index 209e07f..e7f672f 100644
--- a/src/Lucene.Net.Core/Store/ByteBufferIndexInput.cs
+++ b/src/Lucene.Net.Core/Store/ByteBufferIndexInput.cs
@@ -29,7 +29,7 @@ namespace Lucene.Net.Store
     /// <p>
     /// Because Java's ByteBuffer uses an int to address the
     /// values, it's necessary to access a file greater
-    /// Integer.MAX_VALUE in size using multiple byte buffers.
+    /// <see cref="int.MaxValue"/> in size using multiple byte buffers.
     /// <p>
     /// For efficiency, this class requires that the buffers
     /// are a power-of-two (<code>chunkSizePower</code>).

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/75df5756/src/Lucene.Net.Core/Store/CompoundFileDirectory.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Core/Store/CompoundFileDirectory.cs b/src/Lucene.Net.Core/Store/CompoundFileDirectory.cs
index d6049f8..136ad47 100644
--- a/src/Lucene.Net.Core/Store/CompoundFileDirectory.cs
+++ b/src/Lucene.Net.Core/Store/CompoundFileDirectory.cs
@@ -432,7 +432,7 @@ namespace Lucene.Net.Store
             FileEntry entry = entries[id];
             if (entry == null)
             {
-                throw new Exception("No sub-file with id " + id + " found (fileName=" + name
+ " files: " + entries.Keys + ")");
+                throw new Exception("No sub-file with id " + id + " found (fileName=" + name
+ " files: " + Arrays.ToString(entries.Keys) + ")");
             }
             return new IndexInputSlicerAnonymousInnerClassHelper(this, entry);
         }

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/75df5756/src/Lucene.Net.Core/Store/FSDirectory.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Core/Store/FSDirectory.cs b/src/Lucene.Net.Core/Store/FSDirectory.cs
index 91a709c..a4bd835 100644
--- a/src/Lucene.Net.Core/Store/FSDirectory.cs
+++ b/src/Lucene.Net.Core/Store/FSDirectory.cs
@@ -260,8 +260,8 @@ namespace Lucene.Net.Store
             }
 
             // Exclude subdirs
-            FileInfo[] files = dir.EnumerateFiles().ToArray();
-            string[] result = new String[files.Length];
+            FileInfo[] files = dir.EnumerateFiles().ToArray(); // LUCENENET TODO: BUG Original
implementation returned a recursive list of files (excluding directories)
+            string[] result = new string[files.Length];
 
             for (int i = 0; i < files.Length; i++)
             {

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/75df5756/src/Lucene.Net.Core/Support/AtomicInteger.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Core/Support/AtomicInteger.cs b/src/Lucene.Net.Core/Support/AtomicInteger.cs
index 4c07b65..c9c2f02 100644
--- a/src/Lucene.Net.Core/Support/AtomicInteger.cs
+++ b/src/Lucene.Net.Core/Support/AtomicInteger.cs
@@ -60,5 +60,10 @@ namespace Lucene.Net.Support
             int rc = Interlocked.CompareExchange(ref value, update, expect);
             return rc == expect;
         }
+
+        public override string ToString()
+        {
+            return Get().ToString();
+        }
     }
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/75df5756/src/Lucene.Net.Core/Support/AtomicLong.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Core/Support/AtomicLong.cs b/src/Lucene.Net.Core/Support/AtomicLong.cs
index a62a813..65b15d2 100644
--- a/src/Lucene.Net.Core/Support/AtomicLong.cs
+++ b/src/Lucene.Net.Core/Support/AtomicLong.cs
@@ -55,5 +55,10 @@ namespace Lucene.Net.Support
             long rc = Interlocked.CompareExchange(ref value, update, expect);
             return rc == expect;
         }
+
+        public override string ToString()
+        {
+            return Get().ToString();
+        }
     }
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/75df5756/src/Lucene.Net.Core/Util/ArrayUtil.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Core/Util/ArrayUtil.cs b/src/Lucene.Net.Core/Util/ArrayUtil.cs
index f44a6d7..8d8e521 100644
--- a/src/Lucene.Net.Core/Util/ArrayUtil.cs
+++ b/src/Lucene.Net.Core/Util/ArrayUtil.cs
@@ -31,7 +31,7 @@ namespace Lucene.Net.Util
     {
         /// <summary>
         /// Maximum length for an array; we set this to "a
-        ///  bit" below Integer.MAX_VALUE because the exact max
+        ///  bit" below <see cref="int.MaxValue"/> because the exact max
         ///  allowed byte[] is JVM dependent, so we want to avoid
         ///  a case where a large value worked during indexing on
         ///  one JVM but failed later at search time with a

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/75df5756/src/Lucene.Net.Core/Util/Fst/BytesStore.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Core/Util/Fst/BytesStore.cs b/src/Lucene.Net.Core/Util/Fst/BytesStore.cs
index 0d2e5da..c675049 100644
--- a/src/Lucene.Net.Core/Util/Fst/BytesStore.cs
+++ b/src/Lucene.Net.Core/Util/Fst/BytesStore.cs
@@ -484,7 +484,7 @@ namespace Lucene.Net.Util.Fst
                     nextBuffer = bufferIndex + 1;
                     current = outerInstance.blocks[bufferIndex];
                     nextRead = (int)(value & outerInstance.blockMask);
-                    Debug.Assert(this.Position == value, "pos=" + value + " getPos()=" +
this.Position);
+                    Debug.Assert(this.Position == value, "pos=" + value + " Position=" +
this.Position);
                 }
             }
 

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/75df5756/src/Lucene.Net.Core/Util/PForDeltaDocIdSet.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Core/Util/PForDeltaDocIdSet.cs b/src/Lucene.Net.Core/Util/PForDeltaDocIdSet.cs
index d0d08a9..0920ca3 100644
--- a/src/Lucene.Net.Core/Util/PForDeltaDocIdSet.cs
+++ b/src/Lucene.Net.Core/Util/PForDeltaDocIdSet.cs
@@ -99,7 +99,7 @@ namespace Lucene.Net.Util
 
             /// <summary>
             /// Set the index interval. Every <code>indexInterval</code>-th block
will
-            /// be stored in the index. Set to <seealso cref="Integer#MAX_VALUE"/>
to disable indexing.
+            /// be stored in the index. Set to <see cref="int.MaxValue"/> to disable
indexing.
             /// </summary>
             public virtual Builder SetIndexInterval(int indexInterval)
             {

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/75df5756/src/Lucene.Net.Core/Util/Packed/EliasFanoEncoder.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Core/Util/Packed/EliasFanoEncoder.cs b/src/Lucene.Net.Core/Util/Packed/EliasFanoEncoder.cs
index 6963115..44f3b2f 100644
--- a/src/Lucene.Net.Core/Util/Packed/EliasFanoEncoder.cs
+++ b/src/Lucene.Net.Core/Util/Packed/EliasFanoEncoder.cs
@@ -135,12 +135,12 @@ namespace Lucene.Net.Util.Packed
         ///         <li><code>numValues</code> is negative, or
         ///         <li><code>numValues</code> is non negative and <code>upperBound</code>
is negative, or
         ///         <li>the low bits do not fit in a <code>long[]</code>:
-        ///             <code>(L * numValues / 64) > Integer.MAX_VALUE</code>,
or
+        ///             <code>(L * numValues / 64) > System.Int32.MaxValue</code>,
or
         ///         <li>the high bits do not fit in a <code>long[]</code>:
-        ///             <code>(2 * numValues / 64) > Integer.MAX_VALUE</code>,
or
+        ///             <code>(2 * numValues / 64) > System.Int32.MaxValue</code>,
or
         ///         <li><code>indexInterval < 2</code>,
         ///         <li>the index bits do not fit in a <code>long[]</code>:
-        ///             <code>(numValues / indexInterval * ceil(2log(3 * numValues))
/ 64) > Integer.MAX_VALUE</code>.
+        ///             <code>(numValues / indexInterval * ceil(2log(3 * numValues))
/ 64) > System.Int32.MaxValue</code>.
         ///         </ul> </exception>
         public EliasFanoEncoder(long numValues, long upperBound, long indexInterval)
         {

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/75df5756/src/Lucene.Net.Core/Util/WAH8DocIdSet.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Core/Util/WAH8DocIdSet.cs b/src/Lucene.Net.Core/Util/WAH8DocIdSet.cs
index 9d34c64..2641a41 100644
--- a/src/Lucene.Net.Core/Util/WAH8DocIdSet.cs
+++ b/src/Lucene.Net.Core/Util/WAH8DocIdSet.cs
@@ -296,7 +296,7 @@ namespace Lucene.Net.Util
             ///  larger. An index interval <code>i</code> makes the index add
an overhead
             ///  which is at most <code>4/i</code>, but likely much less.The
default index
             ///  interval is <code>8</code>, meaning the index has an overhead
of at most
-            ///  50%. To disable indexing, you can pass <seealso cref="Integer#MAX_VALUE"/>
as an
+            ///  50%. To disable indexing, you can pass <see cref="int.MaxValue"/>
as an
             ///  index interval.
             /// </summary>
             public virtual object SetIndexInterval(int indexInterval)

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/75df5756/src/Lucene.Net.Facet/DrillSidewaysScorer.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Facet/DrillSidewaysScorer.cs b/src/Lucene.Net.Facet/DrillSidewaysScorer.cs
index 7ecdaef..81e5e1c 100644
--- a/src/Lucene.Net.Facet/DrillSidewaysScorer.cs
+++ b/src/Lucene.Net.Facet/DrillSidewaysScorer.cs
@@ -66,7 +66,7 @@ namespace Lucene.Net.Facet
         {
             if (maxDoc != int.MaxValue)
             {
-                throw new System.ArgumentException("maxDoc must be Integer.MAX_VALUE");
+                throw new System.ArgumentException("maxDoc must be System.Int32.MaxValue");
             }
             //if (DEBUG) {
             //  System.out.println("\nscore: reader=" + context.reader());

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/75df5756/src/Lucene.Net.Facet/SortedSet/DefaultSortedSetDocValuesReaderState.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Facet/SortedSet/DefaultSortedSetDocValuesReaderState.cs b/src/Lucene.Net.Facet/SortedSet/DefaultSortedSetDocValuesReaderState.cs
index ffdcf61..fcd545b 100644
--- a/src/Lucene.Net.Facet/SortedSet/DefaultSortedSetDocValuesReaderState.cs
+++ b/src/Lucene.Net.Facet/SortedSet/DefaultSortedSetDocValuesReaderState.cs
@@ -56,7 +56,7 @@ namespace Lucene.Net.Facet.SortedSet
             }
             if (dv.ValueCount > int.MaxValue)
             {
-                throw new System.ArgumentException("can only handle valueCount < Integer.MAX_VALUE;
got " + dv.ValueCount);
+                throw new System.ArgumentException("can only handle valueCount < System.Int32.MaxValue;
got " + dv.ValueCount);
             }
             valueCount = (int)dv.ValueCount;
 

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/75df5756/src/Lucene.Net.Highlighter/PostingsHighlight/PostingsHighlighter.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Highlighter/PostingsHighlight/PostingsHighlighter.cs b/src/Lucene.Net.Highlighter/PostingsHighlight/PostingsHighlighter.cs
index 8cb7f24..8eb1347 100644
--- a/src/Lucene.Net.Highlighter/PostingsHighlight/PostingsHighlighter.cs
+++ b/src/Lucene.Net.Highlighter/PostingsHighlight/PostingsHighlighter.cs
@@ -117,7 +117,7 @@ namespace Lucene.Net.Search.PostingsHighlight
             {
                 // two reasons: no overflow problems in BreakIterator.preceding(offset+1),
                 // our sentinel in the offsets queue uses this value to terminate.
-                throw new ArgumentException("maxLength must be < Integer.MAX_VALUE");
+                throw new ArgumentException("maxLength must be < System.Int32.MaxValue");
             }
             this.maxLength = maxLength;
         }


Mime
View raw message