This is an automated email from the ASF dual-hosted git repository. nightowl888 pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/lucenenet.git
commit c2d55219e5be0bf14fcce5094bdb05a7d04cf2f8 Author: Shad Storhaug <[email protected]> AuthorDate: Thu Jul 16 02:00:32 2020 +0700 SWEEP: Removed fully-qualified namespace from System exception types and added using directives instead --- .../Analysis/CommonGrams/CommonGramsFilter.cs | 3 +- .../Analysis/CommonGrams/CommonGramsQueryFilter.cs | 2 +- .../Analysis/Hunspell/Dictionary.cs | 4 +-- .../Miscellaneous/HyphenatedWordsFilter.cs | 3 +- .../Miscellaneous/Lucene47WordDelimiterFilter.cs | 2 +- .../Analysis/Miscellaneous/PatternAnalyzer.cs | 4 +-- .../Analysis/Sinks/TeeSinkTokenFilter.cs | 2 +- .../Analysis/Standard/ClassicTokenizerImpl.cs | 2 +- .../Analysis/Standard/StandardTokenizerImpl.cs | 2 +- .../ByTask/Feeds/QueryMaker.cs | 3 +- .../ByTask/Feeds/SimpleQueryMaker.cs | 3 +- .../Support/Sax/Ext/Attributes2.cs | 4 +-- .../Memory/DirectDocValuesProducer.cs | 2 +- .../Memory/DirectPostingsFormat.cs | 2 +- src/Lucene.Net.Facet/Range/Range.cs | 2 +- .../Taxonomy/Directory/DirectoryTaxonomyWriter.cs | 2 +- .../Highlight/GradientFormatter.cs | 2 +- src/Lucene.Net.Memory/MemoryIndexNormDocValues.cs | 6 ++-- .../Http/Abstractions/IReplicationService.cs | 6 ++-- .../CharFilters/TestMappingCharFilterFactory.cs | 2 +- .../Analysis/Core/TestClassicAnalyzer.cs | 2 +- .../TestDemoExpressions.cs | 2 +- .../Taxonomy/TestTaxonomyCombined.cs | 8 ++--- .../IndexAndTaxonomyRevisionTest.cs | 2 +- src/Lucene.Net.Tests/Index/TestAddIndexes.cs | 4 +-- .../Index/TestIndexWriterExceptions.cs | 4 +-- .../Index/TestIndexWriterMerging.cs | 2 +- .../Index/TestIndexWriterWithThreads.cs | 2 +- src/Lucene.Net.Tests/Index/TestReaderClosed.cs | 4 +-- src/Lucene.Net.Tests/Index/TestSegmentReader.cs | 8 ++--- src/Lucene.Net.Tests/Util/Packed/TestPackedInts.cs | 8 ++--- .../Util/StressRamUsageEstimator.cs | 4 +-- src/Lucene.Net.Tests/Util/TestCharsRef.cs | 4 +-- .../Util/TestRamUsageEstimatorOnWildAnimals.cs | 3 +- src/Lucene.Net.Tests/Util/TestUnicodeUtil.cs | 2 +- src/Lucene.Net/Analysis/TokenFilter.cs | 5 +-- src/Lucene.Net/Codecs/Lucene40/BitVector.cs | 8 ++--- src/Lucene.Net/Index/ConcurrentMergeScheduler.cs | 5 +-- src/Lucene.Net/Index/DirectoryReader.cs | 2 +- src/Lucene.Net/Index/DocValues.cs | 6 ++-- src/Lucene.Net/Index/IndexWriter.cs | 38 +++++++++++----------- src/Lucene.Net/Index/IndexWriterConfig.cs | 2 +- src/Lucene.Net/Index/LiveIndexWriterConfig.cs | 4 +-- src/Lucene.Net/Index/SegmentReader.cs | 3 +- src/Lucene.Net/Search/ConstantScoreQuery.cs | 12 ++----- src/Lucene.Net/Search/FieldCacheImpl.cs | 16 ++++----- src/Lucene.Net/Search/QueryWrapperFilter.cs | 33 ++++++++++--------- .../Search/Similarities/DFRSimilarity.cs | 4 ++- src/Lucene.Net/Search/Weight.cs | 7 ++-- src/Lucene.Net/Store/FSDirectory.cs | 13 +++++--- .../Store/RateLimitedDirectoryWrapper.cs | 7 ++-- src/Lucene.Net/Support/ConcurrentHashSet.cs | 2 +- .../Document/Extensions/DocumentExtensions.cs | 4 +-- src/Lucene.Net/Util/ArrayUtil.cs | 16 ++++----- src/Lucene.Net/Util/Automaton/RegExp.cs | 2 +- src/Lucene.Net/Util/BytesRefArray.cs | 2 +- src/Lucene.Net/Util/CharsRef.cs | 4 +-- src/Lucene.Net/Util/CommandLineUtil.cs | 9 ++--- src/Lucene.Net/Util/FieldCacheSanityChecker.cs | 2 +- src/Lucene.Net/Util/NumericUtils.cs | 8 ++--- src/Lucene.Net/Util/Packed/Packed16ThreeBlocks.cs | 2 +- src/Lucene.Net/Util/Packed/Packed8ThreeBlocks.cs | 2 +- .../AspNetCoreReplicationRequest.cs | 3 +- 63 files changed, 175 insertions(+), 163 deletions(-) diff --git a/src/Lucene.Net.Analysis.Common/Analysis/CommonGrams/CommonGramsFilter.cs b/src/Lucene.Net.Analysis.Common/Analysis/CommonGrams/CommonGramsFilter.cs index 83e9985..941e369 100644 --- a/src/Lucene.Net.Analysis.Common/Analysis/CommonGrams/CommonGramsFilter.cs +++ b/src/Lucene.Net.Analysis.Common/Analysis/CommonGrams/CommonGramsFilter.cs @@ -1,6 +1,7 @@ using Lucene.Net.Analysis.TokenAttributes; using Lucene.Net.Analysis.Util; using Lucene.Net.Util; +using System; using System.Text; namespace Lucene.Net.Analysis.CommonGrams @@ -136,7 +137,7 @@ namespace Lucene.Net.Analysis.CommonGrams /// <para/> /// If you override this method, always call <c>base.Reset()</c>, otherwise /// some internal state will not be correctly reset (e.g., <see cref="Tokenizer"/> will - /// throw <see cref="System.InvalidOperationException"/> on further usage). + /// throw <see cref="InvalidOperationException"/> on further usage). /// </summary> /// <remarks> /// <b>NOTE:</b> diff --git a/src/Lucene.Net.Analysis.Common/Analysis/CommonGrams/CommonGramsQueryFilter.cs b/src/Lucene.Net.Analysis.Common/Analysis/CommonGrams/CommonGramsQueryFilter.cs index d95751e..312aa6f 100644 --- a/src/Lucene.Net.Analysis.Common/Analysis/CommonGrams/CommonGramsQueryFilter.cs +++ b/src/Lucene.Net.Analysis.Common/Analysis/CommonGrams/CommonGramsQueryFilter.cs @@ -66,7 +66,7 @@ namespace Lucene.Net.Analysis.CommonGrams /// <para/> /// If you override this method, always call <c>base.Reset()</c>, otherwise /// some internal state will not be correctly reset (e.g., <see cref="Tokenizer"/> will - /// throw <see cref="System.InvalidOperationException"/> on further usage). + /// throw <see cref="InvalidOperationException"/> on further usage). /// </summary> /// <remarks> /// <b>NOTE:</b> diff --git a/src/Lucene.Net.Analysis.Common/Analysis/Hunspell/Dictionary.cs b/src/Lucene.Net.Analysis.Common/Analysis/Hunspell/Dictionary.cs index 1d51453..80b83f5 100644 --- a/src/Lucene.Net.Analysis.Common/Analysis/Hunspell/Dictionary.cs +++ b/src/Lucene.Net.Analysis.Common/Analysis/Hunspell/Dictionary.cs @@ -564,7 +564,7 @@ namespace Lucene.Net.Analysis.Hunspell } if (mappings.Put(parts[1], parts[2]) != null) { - throw new System.InvalidOperationException("duplicate mapping specified for: " + parts[1]); + throw new InvalidOperationException("duplicate mapping specified for: " + parts[1]); } } @@ -993,7 +993,7 @@ namespace Lucene.Net.Analysis.Hunspell { return aliases[id - 1]; } - catch (System.IndexOutOfRangeException ex) + catch (IndexOutOfRangeException ex) { throw new ArgumentException("Bad flag alias number:" + id, ex); } diff --git a/src/Lucene.Net.Analysis.Common/Analysis/Miscellaneous/HyphenatedWordsFilter.cs b/src/Lucene.Net.Analysis.Common/Analysis/Miscellaneous/HyphenatedWordsFilter.cs index e12e123..156ae10 100644 --- a/src/Lucene.Net.Analysis.Common/Analysis/Miscellaneous/HyphenatedWordsFilter.cs +++ b/src/Lucene.Net.Analysis.Common/Analysis/Miscellaneous/HyphenatedWordsFilter.cs @@ -1,4 +1,5 @@ using Lucene.Net.Analysis.TokenAttributes; +using System; using System.Text; namespace Lucene.Net.Analysis.Miscellaneous @@ -147,7 +148,7 @@ namespace Lucene.Net.Analysis.Miscellaneous /// <para/> /// If you override this method, always call <c>base.Reset()</c>, otherwise /// some internal state will not be correctly reset (e.g., <see cref="Tokenizer"/> will - /// throw <see cref="System.InvalidOperationException"/> on further usage). + /// throw <see cref="InvalidOperationException"/> on further usage). /// </summary> /// <remarks> /// <b>NOTE:</b> diff --git a/src/Lucene.Net.Analysis.Common/Analysis/Miscellaneous/Lucene47WordDelimiterFilter.cs b/src/Lucene.Net.Analysis.Common/Analysis/Miscellaneous/Lucene47WordDelimiterFilter.cs index 2e0e21c..8af793d 100644 --- a/src/Lucene.Net.Analysis.Common/Analysis/Miscellaneous/Lucene47WordDelimiterFilter.cs +++ b/src/Lucene.Net.Analysis.Common/Analysis/Miscellaneous/Lucene47WordDelimiterFilter.cs @@ -254,7 +254,7 @@ namespace Lucene.Net.Analysis.Miscellaneous /// <para/> /// If you override this method, always call <c>base.Reset()</c>, otherwise /// some internal state will not be correctly reset (e.g., <see cref="Tokenizer"/> will - /// throw <see cref="System.InvalidOperationException"/> on further usage). + /// throw <see cref="InvalidOperationException"/> on further usage). /// </summary> /// <remarks> /// <b>NOTE:</b> diff --git a/src/Lucene.Net.Analysis.Common/Analysis/Miscellaneous/PatternAnalyzer.cs b/src/Lucene.Net.Analysis.Common/Analysis/Miscellaneous/PatternAnalyzer.cs index 24b2dda..12b7166 100644 --- a/src/Lucene.Net.Analysis.Common/Analysis/Miscellaneous/PatternAnalyzer.cs +++ b/src/Lucene.Net.Analysis.Common/Analysis/Miscellaneous/PatternAnalyzer.cs @@ -376,7 +376,7 @@ namespace Lucene.Net.Analysis.Miscellaneous { if (!initialized) { - throw new System.InvalidOperationException("Consumer did not call reset()."); + throw new InvalidOperationException("Consumer did not call reset()."); } if (matcher == null) { @@ -493,7 +493,7 @@ namespace Lucene.Net.Analysis.Miscellaneous { if (str == null) { - throw new System.InvalidOperationException("Consumer did not call reset()."); + throw new InvalidOperationException("Consumer did not call reset()."); } ClearAttributes(); // cache loop instance vars (performance) diff --git a/src/Lucene.Net.Analysis.Common/Analysis/Sinks/TeeSinkTokenFilter.cs b/src/Lucene.Net.Analysis.Common/Analysis/Sinks/TeeSinkTokenFilter.cs index a0d6870..4320687 100644 --- a/src/Lucene.Net.Analysis.Common/Analysis/Sinks/TeeSinkTokenFilter.cs +++ b/src/Lucene.Net.Analysis.Common/Analysis/Sinks/TeeSinkTokenFilter.cs @@ -219,7 +219,7 @@ namespace Lucene.Net.Analysis.Sinks { if (it != null) { - throw new System.InvalidOperationException("The tee must be consumed before sinks are consumed."); + throw new InvalidOperationException("The tee must be consumed before sinks are consumed."); } cachedStates.Add(state); } diff --git a/src/Lucene.Net.Analysis.Common/Analysis/Standard/ClassicTokenizerImpl.cs b/src/Lucene.Net.Analysis.Common/Analysis/Standard/ClassicTokenizerImpl.cs index 0e1a63f..0de05fd 100644 --- a/src/Lucene.Net.Analysis.Common/Analysis/Standard/ClassicTokenizerImpl.cs +++ b/src/Lucene.Net.Analysis.Common/Analysis/Standard/ClassicTokenizerImpl.cs @@ -604,7 +604,7 @@ namespace Lucene.Net.Analysis.Standard { message = ZZ_ERROR_MSG[errorCode]; } - catch (System.IndexOutOfRangeException) + catch (IndexOutOfRangeException) { message = ZZ_ERROR_MSG[ZZ_UNKNOWN_ERROR]; } diff --git a/src/Lucene.Net.Analysis.Common/Analysis/Standard/StandardTokenizerImpl.cs b/src/Lucene.Net.Analysis.Common/Analysis/Standard/StandardTokenizerImpl.cs index 4b9290b..ca34d71 100644 --- a/src/Lucene.Net.Analysis.Common/Analysis/Standard/StandardTokenizerImpl.cs +++ b/src/Lucene.Net.Analysis.Common/Analysis/Standard/StandardTokenizerImpl.cs @@ -1201,7 +1201,7 @@ namespace Lucene.Net.Analysis.Standard { message = ZZ_ERROR_MSG[errorCode]; } - catch (System.IndexOutOfRangeException) + catch (IndexOutOfRangeException) { message = ZZ_ERROR_MSG[ZZ_UNKNOWN_ERROR]; } diff --git a/src/Lucene.Net.Benchmark/ByTask/Feeds/QueryMaker.cs b/src/Lucene.Net.Benchmark/ByTask/Feeds/QueryMaker.cs index b5d00ac..e33e358 100644 --- a/src/Lucene.Net.Benchmark/ByTask/Feeds/QueryMaker.cs +++ b/src/Lucene.Net.Benchmark/ByTask/Feeds/QueryMaker.cs @@ -1,5 +1,6 @@ using Lucene.Net.Benchmarks.ByTask.Utils; using Lucene.Net.Search; +using System; namespace Lucene.Net.Benchmarks.ByTask.Feeds { @@ -30,7 +31,7 @@ namespace Lucene.Net.Benchmarks.ByTask.Feeds /// </summary> /// <param name="size">The size of the query - number of terms, etc.</param> /// <returns></returns> - /// <exception cref="System.Exception">If cannot make the query, or if size > 0 was specified but this feature is not supported.</exception> + /// <exception cref="Exception">If cannot make the query, or if size > 0 was specified but this feature is not supported.</exception> Query MakeQuery(int size); /// <summary>Create the next query</summary> diff --git a/src/Lucene.Net.Benchmark/ByTask/Feeds/SimpleQueryMaker.cs b/src/Lucene.Net.Benchmark/ByTask/Feeds/SimpleQueryMaker.cs index 1e88a00..130a3ab 100644 --- a/src/Lucene.Net.Benchmark/ByTask/Feeds/SimpleQueryMaker.cs +++ b/src/Lucene.Net.Benchmark/ByTask/Feeds/SimpleQueryMaker.cs @@ -4,6 +4,7 @@ using Lucene.Net.Index; using Lucene.Net.QueryParsers.Classic; using Lucene.Net.Search; using Lucene.Net.Util; +using System; using System.Collections.Generic; namespace Lucene.Net.Benchmarks.ByTask.Feeds @@ -36,7 +37,7 @@ namespace Lucene.Net.Benchmarks.ByTask.Feeds /// Extending classes can override this method for preparing different queries. /// </summary> /// <returns>Prepared queries.</returns> - /// <exception cref="System.Exception">If cannot prepare the queries.</exception> + /// <exception cref="Exception">If cannot prepare the queries.</exception> protected override Query[] PrepareQueries() { // analyzer (default is standard analyzer) diff --git a/src/Lucene.Net.Benchmark/Support/Sax/Ext/Attributes2.cs b/src/Lucene.Net.Benchmark/Support/Sax/Ext/Attributes2.cs index 6503fdb..07113b6 100644 --- a/src/Lucene.Net.Benchmark/Support/Sax/Ext/Attributes2.cs +++ b/src/Lucene.Net.Benchmark/Support/Sax/Ext/Attributes2.cs @@ -41,7 +41,7 @@ namespace Sax.Ext /// </summary> /// <param name="index">The attribute index (zero-based).</param> /// <returns>true if the attribute was declared in the DTD, false otherwise.</returns> - /// <exception cref="System.IndexOutOfRangeException">When the supplied index does not identify an attribute.</exception> + /// <exception cref="IndexOutOfRangeException">When the supplied index does not identify an attribute.</exception> bool IsDeclared(int index); /// <summary> @@ -79,7 +79,7 @@ namespace Sax.Ext /// </summary> /// <param name="index">The attribute index (zero-based).</param> /// <returns>true if the value was found in the XML text, false if the value was provided by DTD defaulting.</returns> - /// <exception cref="System.IndexOutOfRangeException">When the supplied index does not identify an attribute.</exception> + /// <exception cref="IndexOutOfRangeException">When the supplied index does not identify an attribute.</exception> bool IsSpecified(int index); /// <summary> diff --git a/src/Lucene.Net.Codecs/Memory/DirectDocValuesProducer.cs b/src/Lucene.Net.Codecs/Memory/DirectDocValuesProducer.cs index 3db2dfd..bf5fa2e 100644 --- a/src/Lucene.Net.Codecs/Memory/DirectDocValuesProducer.cs +++ b/src/Lucene.Net.Codecs/Memory/DirectDocValuesProducer.cs @@ -271,7 +271,7 @@ namespace Lucene.Net.Codecs.Memory } default: - throw new System.InvalidOperationException(); + throw new InvalidOperationException(); } } diff --git a/src/Lucene.Net.Codecs/Memory/DirectPostingsFormat.cs b/src/Lucene.Net.Codecs/Memory/DirectPostingsFormat.cs index e5110c7..b92fb41 100644 --- a/src/Lucene.Net.Codecs/Memory/DirectPostingsFormat.cs +++ b/src/Lucene.Net.Codecs/Memory/DirectPostingsFormat.cs @@ -2278,7 +2278,7 @@ namespace Lucene.Net.Codecs.Memory { return docID = docIDs[upto]; } - catch (System.IndexOutOfRangeException) + catch (IndexOutOfRangeException) { } } diff --git a/src/Lucene.Net.Facet/Range/Range.cs b/src/Lucene.Net.Facet/Range/Range.cs index 2c20df8..87c6351 100644 --- a/src/Lucene.Net.Facet/Range/Range.cs +++ b/src/Lucene.Net.Facet/Range/Range.cs @@ -40,7 +40,7 @@ namespace Lucene.Net.Facet.Range { if (label == null) { - throw new System.NullReferenceException("label cannot be null"); + throw new NullReferenceException("label cannot be null"); } this.Label = label; } diff --git a/src/Lucene.Net.Facet/Taxonomy/Directory/DirectoryTaxonomyWriter.cs b/src/Lucene.Net.Facet/Taxonomy/Directory/DirectoryTaxonomyWriter.cs index 4538906..540ed54 100644 --- a/src/Lucene.Net.Facet/Taxonomy/Directory/DirectoryTaxonomyWriter.cs +++ b/src/Lucene.Net.Facet/Taxonomy/Directory/DirectoryTaxonomyWriter.cs @@ -882,7 +882,7 @@ namespace Lucene.Net.Facet.Taxonomy.Directory // was allocated bigger than it really needs to be. if (ordinal >= nextID) { - throw new System.IndexOutOfRangeException("requested ordinal is bigger than the largest ordinal in the taxonomy"); + throw new IndexOutOfRangeException("requested ordinal is bigger than the largest ordinal in the taxonomy"); } int[] parents = GetTaxoArrays().Parents; diff --git a/src/Lucene.Net.Highlighter/Highlight/GradientFormatter.cs b/src/Lucene.Net.Highlighter/Highlight/GradientFormatter.cs index b3d18b9..180546c 100644 --- a/src/Lucene.Net.Highlighter/Highlight/GradientFormatter.cs +++ b/src/Lucene.Net.Highlighter/Highlight/GradientFormatter.cs @@ -208,7 +208,7 @@ namespace Lucene.Net.Search.Highlight try { // LUCENENET NOTE: Convert.ToInt32(string, int) throws a - // System.FormatException if the character does not fall in + // FormatException if the character does not fall in // the correct range, which is the behavior we are expecting. // But throws an ArgumentException if passed a negative number. // So we need to convert to FormatException to provide the correct behavior. diff --git a/src/Lucene.Net.Memory/MemoryIndexNormDocValues.cs b/src/Lucene.Net.Memory/MemoryIndexNormDocValues.cs index 9544945..a6dc2a9 100644 --- a/src/Lucene.Net.Memory/MemoryIndexNormDocValues.cs +++ b/src/Lucene.Net.Memory/MemoryIndexNormDocValues.cs @@ -1,4 +1,6 @@ -namespace Lucene.Net.Index.Memory +using System; + +namespace Lucene.Net.Index.Memory { /* * Licensed to the Apache Software Foundation (ASF) under one or more @@ -33,7 +35,7 @@ { if (docID != 0) { - throw new System.IndexOutOfRangeException(); + throw new IndexOutOfRangeException(); } else { diff --git a/src/Lucene.Net.Replicator/Support/Http/Abstractions/IReplicationService.cs b/src/Lucene.Net.Replicator/Support/Http/Abstractions/IReplicationService.cs index abbd46d..6d0c17c 100644 --- a/src/Lucene.Net.Replicator/Support/Http/Abstractions/IReplicationService.cs +++ b/src/Lucene.Net.Replicator/Support/Http/Abstractions/IReplicationService.cs @@ -1,4 +1,6 @@ -namespace Lucene.Net.Replicator.Http.Abstractions +using System; + +namespace Lucene.Net.Replicator.Http.Abstractions { /* * Licensed to the Apache Software Foundation (ASF) under one or more @@ -25,7 +27,7 @@ /// <summary> /// Executes the replication task. /// </summary> - /// <exception cref="System.InvalidOperationException">required parameters are missing</exception> + /// <exception cref="InvalidOperationException">required parameters are missing</exception> void Perform(IReplicationRequest request, IReplicationResponse response); } } diff --git a/src/Lucene.Net.Tests.Analysis.Common/Analysis/CharFilters/TestMappingCharFilterFactory.cs b/src/Lucene.Net.Tests.Analysis.Common/Analysis/CharFilters/TestMappingCharFilterFactory.cs index 2cc2a12..afe5b8c 100644 --- a/src/Lucene.Net.Tests.Analysis.Common/Analysis/CharFilters/TestMappingCharFilterFactory.cs +++ b/src/Lucene.Net.Tests.Analysis.Common/Analysis/CharFilters/TestMappingCharFilterFactory.cs @@ -56,7 +56,7 @@ namespace Lucene.Net.Analysis.CharFilters f.ParseString("\\u123x"); fail("invalid hex number check."); } - catch (System.FormatException) + catch (FormatException) { } } diff --git a/src/Lucene.Net.Tests.Analysis.Common/Analysis/Core/TestClassicAnalyzer.cs b/src/Lucene.Net.Tests.Analysis.Common/Analysis/Core/TestClassicAnalyzer.cs index 7e66774..1c30cc8 100644 --- a/src/Lucene.Net.Tests.Analysis.Common/Analysis/Core/TestClassicAnalyzer.cs +++ b/src/Lucene.Net.Tests.Analysis.Common/Analysis/Core/TestClassicAnalyzer.cs @@ -129,7 +129,7 @@ namespace Lucene.Net.Analysis.Core ClassicAnalyzer analyzer = new ClassicAnalyzer(TEST_VERSION_CURRENT); AssertAnalyzesTo(analyzer, "www.nutch.org.", new string[] { "www.nutch.org" }, new string[] { "<HOST>" }); } - catch (System.NullReferenceException) + catch (NullReferenceException) { fail("Should not throw an NPE and it did"); } diff --git a/src/Lucene.Net.Tests.Expressions/TestDemoExpressions.cs b/src/Lucene.Net.Tests.Expressions/TestDemoExpressions.cs index 9bff77a..c3d167f 100644 --- a/src/Lucene.Net.Tests.Expressions/TestDemoExpressions.cs +++ b/src/Lucene.Net.Tests.Expressions/TestDemoExpressions.cs @@ -176,7 +176,7 @@ namespace Lucene.Net.Expressions // TODO: ideally we'd test > Short.MAX_VALUE too, but compilation is currently recursive. // so if we want to test such huge expressions, we need to instead change parser to use an explicit Stack - /// <exception cref="System.Exception"></exception> + /// <exception cref="Exception"></exception> private void DoTestLotsOfBindings(int n) { SimpleBindings bindings = new SimpleBindings(); diff --git a/src/Lucene.Net.Tests.Facet/Taxonomy/TestTaxonomyCombined.cs b/src/Lucene.Net.Tests.Facet/Taxonomy/TestTaxonomyCombined.cs index 8baeec1..980d5a9 100644 --- a/src/Lucene.Net.Tests.Facet/Taxonomy/TestTaxonomyCombined.cs +++ b/src/Lucene.Net.Tests.Facet/Taxonomy/TestTaxonomyCombined.cs @@ -517,7 +517,7 @@ namespace Lucene.Net.Facet.Taxonomy tw.GetParent(-1); fail("getParent for -1 should throw exception"); } - catch (System.IndexOutOfRangeException) + catch (IndexOutOfRangeException) { // ok } @@ -526,7 +526,7 @@ namespace Lucene.Net.Facet.Taxonomy tw.GetParent(TaxonomyReader.INVALID_ORDINAL); fail("getParent for INVALID_ORDINAL should throw exception"); } - catch (System.IndexOutOfRangeException) + catch (IndexOutOfRangeException) { // ok } @@ -535,7 +535,7 @@ namespace Lucene.Net.Facet.Taxonomy int parent = tw.GetParent(tr.Count); fail("getParent for getSize() should throw exception, but returned " + parent); } - catch (System.IndexOutOfRangeException) + catch (IndexOutOfRangeException) { // ok } @@ -953,7 +953,7 @@ namespace Lucene.Net.Facet.Taxonomy Assert.AreEqual(TaxonomyReader.ROOT_ORDINAL, tr.ParallelTaxonomyArrays.Parents[author]); // ok } - catch (System.IndexOutOfRangeException) + catch (IndexOutOfRangeException) { fail("After category addition, commit() and refresh(), getParent for " + author + " should NOT throw exception"); } diff --git a/src/Lucene.Net.Tests.Replicator/IndexAndTaxonomyRevisionTest.cs b/src/Lucene.Net.Tests.Replicator/IndexAndTaxonomyRevisionTest.cs index 942ad53..c27b126 100644 --- a/src/Lucene.Net.Tests.Replicator/IndexAndTaxonomyRevisionTest.cs +++ b/src/Lucene.Net.Tests.Replicator/IndexAndTaxonomyRevisionTest.cs @@ -54,7 +54,7 @@ namespace Lucene.Net.Replicator assertNotNull(new IndexAndTaxonomyRevision(indexWriter, taxoWriter)); fail("should have failed when there are no commits to snapshot"); } - catch (System.InvalidOperationException) + catch (InvalidOperationException) { // expected } diff --git a/src/Lucene.Net.Tests/Index/TestAddIndexes.cs b/src/Lucene.Net.Tests/Index/TestAddIndexes.cs index bf712d2..62dad40 100644 --- a/src/Lucene.Net.Tests/Index/TestAddIndexes.cs +++ b/src/Lucene.Net.Tests/Index/TestAddIndexes.cs @@ -862,7 +862,7 @@ namespace Lucene.Net.Index internal override void Handle(Exception t) { - if (!(t is ObjectDisposedException) && !(t is System.NullReferenceException)) + if (!(t is ObjectDisposedException) && !(t is NullReferenceException)) { Console.Error.WriteLine(t.StackTrace); lock (failures) @@ -954,7 +954,7 @@ namespace Lucene.Net.Index { bool report = true; - if (t is ObjectDisposedException || t is MergePolicy.MergeAbortedException || t is System.NullReferenceException) + if (t is ObjectDisposedException || t is MergePolicy.MergeAbortedException || t is NullReferenceException) { report = !didClose; } diff --git a/src/Lucene.Net.Tests/Index/TestIndexWriterExceptions.cs b/src/Lucene.Net.Tests/Index/TestIndexWriterExceptions.cs index ebc0ec2..6ecf310 100644 --- a/src/Lucene.Net.Tests/Index/TestIndexWriterExceptions.cs +++ b/src/Lucene.Net.Tests/Index/TestIndexWriterExceptions.cs @@ -1240,7 +1240,7 @@ namespace Lucene.Net.Index Assert.Fail("OutOfMemoryError expected"); } #pragma warning disable 168 - catch (System.OutOfMemoryException expected) + catch (OutOfMemoryException expected) #pragma warning restore 168 { } @@ -1266,7 +1266,7 @@ namespace Lucene.Net.Index { if (message.StartsWith("now flush at close", StringComparison.Ordinal) && thrown.CompareAndSet(false, true)) { - throw new System.OutOfMemoryException("fake OOME at " + message); + throw new OutOfMemoryException("fake OOME at " + message); } } diff --git a/src/Lucene.Net.Tests/Index/TestIndexWriterMerging.cs b/src/Lucene.Net.Tests/Index/TestIndexWriterMerging.cs index 0d1ce4d..9faef06 100644 --- a/src/Lucene.Net.Tests/Index/TestIndexWriterMerging.cs +++ b/src/Lucene.Net.Tests/Index/TestIndexWriterMerging.cs @@ -465,7 +465,7 @@ namespace Lucene.Net.Index break; } #pragma warning disable 168 - catch (System.NullReferenceException e) + catch (NullReferenceException e) #pragma warning restore 168 { done = true; diff --git a/src/Lucene.Net.Tests/Index/TestIndexWriterWithThreads.cs b/src/Lucene.Net.Tests/Index/TestIndexWriterWithThreads.cs index 46b1788..b3208f6 100644 --- a/src/Lucene.Net.Tests/Index/TestIndexWriterWithThreads.cs +++ b/src/Lucene.Net.Tests/Index/TestIndexWriterWithThreads.cs @@ -807,7 +807,7 @@ namespace Lucene.Net.Index { // ok } - catch (System.NullReferenceException) + catch (NullReferenceException) { // ok } diff --git a/src/Lucene.Net.Tests/Index/TestReaderClosed.cs b/src/Lucene.Net.Tests/Index/TestReaderClosed.cs index a79a114..c95cbb1 100644 --- a/src/Lucene.Net.Tests/Index/TestReaderClosed.cs +++ b/src/Lucene.Net.Tests/Index/TestReaderClosed.cs @@ -74,7 +74,7 @@ namespace Lucene.Net.Index searcher.Search(query, 5); } #pragma warning disable 168 - catch (System.ObjectDisposedException ace) + catch (ObjectDisposedException ace) #pragma warning restore 168 { // expected @@ -97,7 +97,7 @@ namespace Lucene.Net.Index { searcher.Search(query, 5); } - catch (System.ObjectDisposedException ace) + catch (ObjectDisposedException ace) { //Assert.AreEqual("this IndexReader cannot be used anymore as one of its child readers was closed", ace.Message); // LUCENENET specific - ObjectDisposedExeption appends the type of object to the end of the message, diff --git a/src/Lucene.Net.Tests/Index/TestSegmentReader.cs b/src/Lucene.Net.Tests/Index/TestSegmentReader.cs index 4bd5d66..6330a9e 100644 --- a/src/Lucene.Net.Tests/Index/TestSegmentReader.cs +++ b/src/Lucene.Net.Tests/Index/TestSegmentReader.cs @@ -236,7 +236,7 @@ namespace Lucene.Net.Index Assert.Fail(); } #pragma warning disable 168 - catch (System.IndexOutOfRangeException expected) + catch (IndexOutOfRangeException expected) #pragma warning restore 168 { } @@ -247,7 +247,7 @@ namespace Lucene.Net.Index Assert.Fail(); } #pragma warning disable 168 - catch (System.IndexOutOfRangeException expected) + catch (IndexOutOfRangeException expected) #pragma warning restore 168 { } @@ -258,7 +258,7 @@ namespace Lucene.Net.Index Assert.Fail(); } #pragma warning disable 168 - catch (System.IndexOutOfRangeException expected) + catch (IndexOutOfRangeException expected) #pragma warning restore 168 { } @@ -269,7 +269,7 @@ namespace Lucene.Net.Index Assert.Fail(); } #pragma warning disable 168 - catch (System.IndexOutOfRangeException expected) + catch (IndexOutOfRangeException expected) #pragma warning restore 168 { } diff --git a/src/Lucene.Net.Tests/Util/Packed/TestPackedInts.cs b/src/Lucene.Net.Tests/Util/Packed/TestPackedInts.cs index fc5765e..51ed3ac 100644 --- a/src/Lucene.Net.Tests/Util/Packed/TestPackedInts.cs +++ b/src/Lucene.Net.Tests/Util/Packed/TestPackedInts.cs @@ -518,7 +518,7 @@ namespace Lucene.Net.Util.Packed p64 = new Packed64(INDEX, BITS); } #pragma warning disable 168 - catch (System.OutOfMemoryException oome) + catch (OutOfMemoryException oome) #pragma warning restore 168 { // this can easily happen: we're allocating a @@ -540,7 +540,7 @@ namespace Lucene.Net.Util.Packed p64sb = Packed64SingleBlock.Create(INDEX, BITS); } #pragma warning disable 168 - catch (System.OutOfMemoryException oome) + catch (OutOfMemoryException oome) #pragma warning restore 168 { // Ignore: see comment above @@ -558,7 +558,7 @@ namespace Lucene.Net.Util.Packed p8 = new Packed8ThreeBlocks(index); } #pragma warning disable 168 - catch (System.OutOfMemoryException oome) + catch (OutOfMemoryException oome) #pragma warning restore 168 { // Ignore: see comment above @@ -577,7 +577,7 @@ namespace Lucene.Net.Util.Packed p16 = new Packed16ThreeBlocks(index); } #pragma warning disable 168 - catch (System.OutOfMemoryException oome) + catch (OutOfMemoryException oome) #pragma warning restore 168 { // Ignore: see comment above diff --git a/src/Lucene.Net.Tests/Util/StressRamUsageEstimator.cs b/src/Lucene.Net.Tests/Util/StressRamUsageEstimator.cs index 82c9bb9..fe4e043 100644 --- a/src/Lucene.Net.Tests/Util/StressRamUsageEstimator.cs +++ b/src/Lucene.Net.Tests/Util/StressRamUsageEstimator.cs @@ -68,7 +68,7 @@ namespace Lucene.Net.Util } } #pragma warning disable 168 - catch (System.OutOfMemoryException e) + catch (OutOfMemoryException e) #pragma warning restore 168 { // Release and quit. @@ -151,7 +151,7 @@ namespace Lucene.Net.Util } } #pragma warning disable 168 - catch (System.OutOfMemoryException e) + catch (OutOfMemoryException e) #pragma warning restore 168 { // Release and quit. diff --git a/src/Lucene.Net.Tests/Util/TestCharsRef.cs b/src/Lucene.Net.Tests/Util/TestCharsRef.cs index a815a9d..c2a59b8 100644 --- a/src/Lucene.Net.Tests/Util/TestCharsRef.cs +++ b/src/Lucene.Net.Tests/Util/TestCharsRef.cs @@ -133,7 +133,7 @@ namespace Lucene.Net.Util // c.CharAt(-1); // Assert.Fail(); // } - // catch (System.IndexOutOfRangeException expected) + // catch (IndexOutOfRangeException expected) // { // // expected exception // } @@ -143,7 +143,7 @@ namespace Lucene.Net.Util // c.CharAt(3); // Assert.Fail(); // } - // catch (System.IndexOutOfRangeException expected) + // catch (IndexOutOfRangeException expected) // { // // expected exception // } diff --git a/src/Lucene.Net.Tests/Util/TestRamUsageEstimatorOnWildAnimals.cs b/src/Lucene.Net.Tests/Util/TestRamUsageEstimatorOnWildAnimals.cs index c34ca84..eb3b54f 100644 --- a/src/Lucene.Net.Tests/Util/TestRamUsageEstimatorOnWildAnimals.cs +++ b/src/Lucene.Net.Tests/Util/TestRamUsageEstimatorOnWildAnimals.cs @@ -1,4 +1,5 @@ using NUnit.Framework; +using System; namespace Lucene.Net.Util { @@ -53,7 +54,7 @@ namespace Lucene.Net.Util lower = mid; } #pragma warning disable 168 - catch (System.StackOverflowException e) + catch (StackOverflowException e) #pragma warning restore 168 { upper = mid; diff --git a/src/Lucene.Net.Tests/Util/TestUnicodeUtil.cs b/src/Lucene.Net.Tests/Util/TestUnicodeUtil.cs index 6a62994..b3a19d0 100644 --- a/src/Lucene.Net.Tests/Util/TestUnicodeUtil.cs +++ b/src/Lucene.Net.Tests/Util/TestUnicodeUtil.cs @@ -220,7 +220,7 @@ namespace Lucene.Net.Util continue; } #pragma warning disable 168 - catch (System.IndexOutOfRangeException e1) + catch (IndexOutOfRangeException e1) #pragma warning restore 168 { // Ignored. diff --git a/src/Lucene.Net/Analysis/TokenFilter.cs b/src/Lucene.Net/Analysis/TokenFilter.cs index c69d2d2..2b2d6c6 100644 --- a/src/Lucene.Net/Analysis/TokenFilter.cs +++ b/src/Lucene.Net/Analysis/TokenFilter.cs @@ -1,3 +1,4 @@ +using System; using System.IO; namespace Lucene.Net.Analysis @@ -69,7 +70,7 @@ namespace Lucene.Net.Analysis /// <para/> /// If you override this method, always call <c>base.Dispose(disposing)</c>, otherwise /// some internal state will not be correctly reset (e.g., <see cref="Tokenizer"/> will - /// throw <see cref="System.InvalidOperationException"/> on reuse). + /// throw <see cref="InvalidOperationException"/> on reuse). /// <para/> /// <b>NOTE:</b> /// The default implementation chains the call to the input TokenStream, so @@ -92,7 +93,7 @@ namespace Lucene.Net.Analysis /// <para/> /// If you override this method, always call <c>base.Reset()</c>, otherwise /// some internal state will not be correctly reset (e.g., <see cref="Tokenizer"/> will - /// throw <see cref="System.InvalidOperationException"/> on further usage). + /// throw <see cref="InvalidOperationException"/> on further usage). /// </summary> /// <remarks> /// <b>NOTE:</b> diff --git a/src/Lucene.Net/Codecs/Lucene40/BitVector.cs b/src/Lucene.Net/Codecs/Lucene40/BitVector.cs index 87b8f7b..5d7dfbd 100644 --- a/src/Lucene.Net/Codecs/Lucene40/BitVector.cs +++ b/src/Lucene.Net/Codecs/Lucene40/BitVector.cs @@ -96,7 +96,7 @@ namespace Lucene.Net.Codecs.Lucene40 { if (bit >= size) { - throw new System.IndexOutOfRangeException("bit=" + bit + " size=" + size); + throw new IndexOutOfRangeException("bit=" + bit + " size=" + size); } bits[bit >> 3] |= (byte)(1 << (bit & 7)); count = -1; @@ -110,7 +110,7 @@ namespace Lucene.Net.Codecs.Lucene40 { if (bit >= size) { - throw new System.IndexOutOfRangeException("bit=" + bit + " size=" + size); + throw new IndexOutOfRangeException("bit=" + bit + " size=" + size); } int pos = bit >> 3; int v = bits[pos]; @@ -137,7 +137,7 @@ namespace Lucene.Net.Codecs.Lucene40 { if (bit >= size) { - throw new System.IndexOutOfRangeException(bit.ToString()); + throw new IndexOutOfRangeException(bit.ToString()); } bits[bit >> 3] &= (byte)(~(1 << (bit & 7))); count = -1; @@ -147,7 +147,7 @@ namespace Lucene.Net.Codecs.Lucene40 { if (bit >= size) { - throw new System.IndexOutOfRangeException(bit.ToString()); + throw new IndexOutOfRangeException(bit.ToString()); } int pos = bit >> 3; int v = bits[pos]; diff --git a/src/Lucene.Net/Index/ConcurrentMergeScheduler.cs b/src/Lucene.Net/Index/ConcurrentMergeScheduler.cs index dd72bc5..6be45ef 100644 --- a/src/Lucene.Net/Index/ConcurrentMergeScheduler.cs +++ b/src/Lucene.Net/Index/ConcurrentMergeScheduler.cs @@ -3,6 +3,7 @@ using J2N.Threading; using System; using System.Collections.Generic; using System.Runtime.CompilerServices; +using System.Security; using System.Text; using System.Threading; @@ -599,12 +600,12 @@ namespace Lucene.Net.Index Priority = priority; } #pragma warning disable 168 - catch (System.NullReferenceException npe) + catch (NullReferenceException npe) { // Strangely, Sun's JDK 1.5 on Linux sometimes // throws NPE out of here... } - catch (System.Security.SecurityException se) + catch (SecurityException se) #pragma warning restore 168 { // Ignore this because we will still run fine with diff --git a/src/Lucene.Net/Index/DirectoryReader.cs b/src/Lucene.Net/Index/DirectoryReader.cs index c0b19e5..dd7f211 100644 --- a/src/Lucene.Net/Index/DirectoryReader.cs +++ b/src/Lucene.Net/Index/DirectoryReader.cs @@ -229,7 +229,7 @@ namespace Lucene.Net.Index /// <para><b>NOTE</b>: Once the writer is disposed, any /// outstanding readers may continue to be used. However, /// if you attempt to reopen any of those readers, you'll - /// hit an <see cref="System.ObjectDisposedException"/>.</para> + /// hit an <see cref="ObjectDisposedException"/>.</para> /// /// @lucene.experimental /// </summary> diff --git a/src/Lucene.Net/Index/DocValues.cs b/src/Lucene.Net/Index/DocValues.cs index 14d9ed9..cb43dad 100644 --- a/src/Lucene.Net/Index/DocValues.cs +++ b/src/Lucene.Net/Index/DocValues.cs @@ -1,3 +1,5 @@ +using System; + namespace Lucene.Net.Index { /* @@ -115,14 +117,14 @@ namespace Lucene.Net.Index public override void LookupOrd(long ord, BytesRef result) { - throw new System.IndexOutOfRangeException(); + throw new IndexOutOfRangeException(); } public override long ValueCount => 0; public override long OrdAt(int index) { - throw new System.IndexOutOfRangeException(); + throw new IndexOutOfRangeException(); } public override int Cardinality() diff --git a/src/Lucene.Net/Index/IndexWriter.cs b/src/Lucene.Net/Index/IndexWriter.cs index c8ab53b..ef56908 100644 --- a/src/Lucene.Net/Index/IndexWriter.cs +++ b/src/Lucene.Net/Index/IndexWriter.cs @@ -396,7 +396,7 @@ namespace Lucene.Net.Index } } } - catch (System.OutOfMemoryException oom) + catch (OutOfMemoryException oom) { HandleOOM(oom, "getReader"); // never reached but javac disagrees: @@ -1278,7 +1278,7 @@ namespace Lucene.Net.Index } Debug.Assert(docWriter.perThreadPool.NumDeactivatedThreadStates() == docWriter.perThreadPool.MaxThreadStates, "" + docWriter.perThreadPool.NumDeactivatedThreadStates() + " " + docWriter.perThreadPool.MaxThreadStates); } - catch (System.OutOfMemoryException oom) + catch (OutOfMemoryException oom) { HandleOOM(oom, "closeInternal"); } @@ -1577,7 +1577,7 @@ namespace Lucene.Net.Index } } } - catch (System.OutOfMemoryException oom) + catch (OutOfMemoryException oom) { HandleOOM(oom, "updateDocuments"); } @@ -1603,7 +1603,7 @@ namespace Lucene.Net.Index ProcessEvents(true, false); } } - catch (System.OutOfMemoryException oom) + catch (OutOfMemoryException oom) { HandleOOM(oom, "deleteDocuments(Term)"); } @@ -1727,7 +1727,7 @@ namespace Lucene.Net.Index ProcessEvents(true, false); } } - catch (System.OutOfMemoryException oom) + catch (OutOfMemoryException oom) { HandleOOM(oom, "deleteDocuments(Term..)"); } @@ -1753,7 +1753,7 @@ namespace Lucene.Net.Index ProcessEvents(true, false); } } - catch (System.OutOfMemoryException oom) + catch (OutOfMemoryException oom) { HandleOOM(oom, "deleteDocuments(Query)"); } @@ -1781,7 +1781,7 @@ namespace Lucene.Net.Index ProcessEvents(true, false); } } - catch (System.OutOfMemoryException oom) + catch (OutOfMemoryException oom) { HandleOOM(oom, "deleteDocuments(Query..)"); } @@ -1851,7 +1851,7 @@ namespace Lucene.Net.Index } } } - catch (System.OutOfMemoryException oom) + catch (OutOfMemoryException oom) { HandleOOM(oom, "updateDocument"); } @@ -1893,7 +1893,7 @@ namespace Lucene.Net.Index ProcessEvents(true, false); } } - catch (System.OutOfMemoryException oom) + catch (OutOfMemoryException oom) { HandleOOM(oom, "updateNumericDocValue"); } @@ -1939,7 +1939,7 @@ namespace Lucene.Net.Index ProcessEvents(true, false); } } - catch (System.OutOfMemoryException oom) + catch (OutOfMemoryException oom) { HandleOOM(oom, "updateBinaryDocValue"); } @@ -2591,7 +2591,7 @@ namespace Lucene.Net.Index success = true; } - catch (System.OutOfMemoryException oom) + catch (OutOfMemoryException oom) { HandleOOM(oom, "rollbackInternal"); } @@ -2702,7 +2702,7 @@ namespace Lucene.Net.Index globalFieldNumberMap.Clear(); success = true; } - catch (System.OutOfMemoryException oom) + catch (OutOfMemoryException oom) { HandleOOM(oom, "deleteAll"); } @@ -3133,7 +3133,7 @@ namespace Lucene.Net.Index successTop = true; } - catch (System.OutOfMemoryException oom) + catch (OutOfMemoryException oom) { HandleOOM(oom, "addIndexes(Directory...)"); } @@ -3320,7 +3320,7 @@ namespace Lucene.Net.Index Checkpoint(); } } - catch (System.OutOfMemoryException oom) + catch (OutOfMemoryException oom) { HandleOOM(oom, "addIndexes(IndexReader...)"); } @@ -3605,7 +3605,7 @@ namespace Lucene.Net.Index } } } - catch (System.OutOfMemoryException oom) + catch (OutOfMemoryException oom) { HandleOOM(oom, "prepareCommit"); } @@ -3894,7 +3894,7 @@ namespace Lucene.Net.Index return anySegmentFlushed; } } - catch (System.OutOfMemoryException oom) + catch (OutOfMemoryException oom) { HandleOOM(oom, "doFlush"); // never hit @@ -4591,7 +4591,7 @@ namespace Lucene.Net.Index } } } - catch (System.OutOfMemoryException oom) + catch (OutOfMemoryException oom) { HandleOOM(oom, "merge"); } @@ -5542,7 +5542,7 @@ namespace Lucene.Net.Index } } } - catch (System.OutOfMemoryException oom) + catch (OutOfMemoryException oom) { HandleOOM(oom, "startCommit"); } @@ -5605,7 +5605,7 @@ namespace Lucene.Net.Index public abstract void Warm(AtomicReader reader); } - private void HandleOOM(System.OutOfMemoryException oom, string location) + private void HandleOOM(OutOfMemoryException oom, string location) { if (infoStream.IsEnabled("IW")) { diff --git a/src/Lucene.Net/Index/IndexWriterConfig.cs b/src/Lucene.Net/Index/IndexWriterConfig.cs index 802644a..45dd161 100644 --- a/src/Lucene.Net/Index/IndexWriterConfig.cs +++ b/src/Lucene.Net/Index/IndexWriterConfig.cs @@ -431,7 +431,7 @@ namespace Lucene.Net.Index { return ((ThreadAffinityDocumentsWriterThreadPool)indexerThreadPool).MaxThreadStates; } - catch (System.InvalidCastException cce) + catch (InvalidCastException cce) { throw new InvalidOperationException(cce.Message, cce); } diff --git a/src/Lucene.Net/Index/LiveIndexWriterConfig.cs b/src/Lucene.Net/Index/LiveIndexWriterConfig.cs index a65b282..f031115 100644 --- a/src/Lucene.Net/Index/LiveIndexWriterConfig.cs +++ b/src/Lucene.Net/Index/LiveIndexWriterConfig.cs @@ -163,7 +163,7 @@ namespace Lucene.Net.Index codec = Codec.Default; if (codec == null) { - throw new System.NullReferenceException(); + throw new NullReferenceException(); } infoStream = Util.InfoStream.Default; mergePolicy = new TieredMergePolicy(); @@ -506,7 +506,7 @@ namespace Lucene.Net.Index { return ((ThreadAffinityDocumentsWriterThreadPool)indexerThreadPool).MaxThreadStates; } - catch (System.InvalidCastException cce) + catch (InvalidCastException cce) { throw new InvalidOperationException(cce.Message, cce); } diff --git a/src/Lucene.Net/Index/SegmentReader.cs b/src/Lucene.Net/Index/SegmentReader.cs index 4070bbc..ea01688 100644 --- a/src/Lucene.Net/Index/SegmentReader.cs +++ b/src/Lucene.Net/Index/SegmentReader.cs @@ -1,5 +1,6 @@ using J2N.Runtime.CompilerServices; using Lucene.Net.Util; +using System; using System.Collections.Generic; using System.Diagnostics; using System.Globalization; @@ -395,7 +396,7 @@ namespace Lucene.Net.Index { if (docID < 0 || docID >= MaxDoc) { - throw new System.IndexOutOfRangeException("docID must be >= 0 and < maxDoc=" + MaxDoc + " (got docID=" + docID + ")"); + throw new IndexOutOfRangeException("docID must be >= 0 and < maxDoc=" + MaxDoc + " (got docID=" + docID + ")"); } } diff --git a/src/Lucene.Net/Search/ConstantScoreQuery.cs b/src/Lucene.Net/Search/ConstantScoreQuery.cs index 7729124..1f73ff9 100644 --- a/src/Lucene.Net/Search/ConstantScoreQuery.cs +++ b/src/Lucene.Net/Search/ConstantScoreQuery.cs @@ -45,12 +45,8 @@ namespace Lucene.Net.Search /// </summary> public ConstantScoreQuery(Query query) { - if (query == null) - { - throw new System.NullReferenceException("Query may not be null"); - } this.m_filter = null; - this.m_query = query; + this.m_query = query ?? throw new NullReferenceException("Query may not be null"); } /// <summary> @@ -62,11 +58,7 @@ namespace Lucene.Net.Search /// </summary> public ConstantScoreQuery(Filter filter) { - if (filter == null) - { - throw new System.NullReferenceException("Filter may not be null"); - } - this.m_filter = filter; + this.m_filter = filter ?? throw new NullReferenceException("Filter may not be null"); this.m_query = null; } diff --git a/src/Lucene.Net/Search/FieldCacheImpl.cs b/src/Lucene.Net/Search/FieldCacheImpl.cs index ac8aa7d..3e4049b 100644 --- a/src/Lucene.Net/Search/FieldCacheImpl.cs +++ b/src/Lucene.Net/Search/FieldCacheImpl.cs @@ -973,7 +973,7 @@ namespace Lucene.Net.Search return wrapper.GetInt32s(reader, key.field, FieldCache.DEFAULT_INT32_PARSER, setDocsWithField); #pragma warning restore 612, 618 } - catch (System.FormatException) + catch (FormatException) { return wrapper.GetInt32s(reader, key.field, FieldCache.NUMERIC_UTILS_INT32_PARSER, setDocsWithField); } @@ -1023,7 +1023,7 @@ namespace Lucene.Net.Search if (values == null) { // Lazy alloc so for the numeric field case - // (which will hit a System.FormatException + // (which will hit a FormatException // when we first try the DEFAULT_INT32_PARSER), // we don't double-alloc: int startBitsPerValue; @@ -1246,7 +1246,7 @@ namespace Lucene.Net.Search return wrapper.GetSingles(reader, key.field, FieldCache.DEFAULT_SINGLE_PARSER, setDocsWithField); #pragma warning restore 612, 618 } - catch (System.FormatException) + catch (FormatException) { return wrapper.GetSingles(reader, key.field, FieldCache.NUMERIC_UTILS_SINGLE_PARSER, setDocsWithField); } @@ -1296,7 +1296,7 @@ namespace Lucene.Net.Search if (values == null) { // Lazy alloc so for the numeric field case - // (which will hit a System.FormatException + // (which will hit a FormatException // when we first try the DEFAULT_INT32_PARSER), // we don't double-alloc: values = new float[reader.MaxDoc]; @@ -1419,7 +1419,7 @@ namespace Lucene.Net.Search return wrapper.GetInt64s(reader, key.field, FieldCache.DEFAULT_INT64_PARSER, setDocsWithField); #pragma warning restore 612, 618 } - catch (System.FormatException) + catch (FormatException) { return wrapper.GetInt64s(reader, key.field, FieldCache.NUMERIC_UTILS_INT64_PARSER, setDocsWithField); } @@ -1469,7 +1469,7 @@ namespace Lucene.Net.Search if (values == null) { // Lazy alloc so for the numeric field case - // (which will hit a System.FormatException + // (which will hit a FormatException // when we first try the DEFAULT_INT32_PARSER), // we don't double-alloc: int startBitsPerValue; @@ -1594,7 +1594,7 @@ namespace Lucene.Net.Search return wrapper.GetDoubles(reader, key.field, FieldCache.DEFAULT_DOUBLE_PARSER, setDocsWithField); #pragma warning restore 612, 618 } - catch (System.FormatException) + catch (FormatException) { return wrapper.GetDoubles(reader, key.field, FieldCache.NUMERIC_UTILS_DOUBLE_PARSER, setDocsWithField); } @@ -1643,7 +1643,7 @@ namespace Lucene.Net.Search if (values == null) { // Lazy alloc so for the numeric field case - // (which will hit a System.FormatException + // (which will hit a FormatException // when we first try the DEFAULT_INT32_PARSER), // we don't double-alloc: values = new double[reader.MaxDoc]; diff --git a/src/Lucene.Net/Search/QueryWrapperFilter.cs b/src/Lucene.Net/Search/QueryWrapperFilter.cs index 5284053..95ebe61 100644 --- a/src/Lucene.Net/Search/QueryWrapperFilter.cs +++ b/src/Lucene.Net/Search/QueryWrapperFilter.cs @@ -1,21 +1,22 @@ namespace Lucene.Net.Search { + using System; /* - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The ASF licenses this file to You under the Apache License, Version 2.0 - * (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ +* Licensed to the Apache Software Foundation (ASF) under one or more +* contributor license agreements. See the NOTICE file distributed with +* this work for additional information regarding copyright ownership. +* The ASF licenses this file to You under the Apache License, Version 2.0 +* (the "License"); you may not use this file except in compliance with +* the License. You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ using AtomicReaderContext = Lucene.Net.Index.AtomicReaderContext; using IBits = Lucene.Net.Util.IBits; @@ -41,7 +42,7 @@ namespace Lucene.Net.Search { if (query == null) { - throw new System.NullReferenceException("Query may not be null"); + throw new NullReferenceException("Query may not be null"); } this.query = query; } diff --git a/src/Lucene.Net/Search/Similarities/DFRSimilarity.cs b/src/Lucene.Net/Search/Similarities/DFRSimilarity.cs index f3c8129..172f4b3 100644 --- a/src/Lucene.Net/Search/Similarities/DFRSimilarity.cs +++ b/src/Lucene.Net/Search/Similarities/DFRSimilarity.cs @@ -1,3 +1,5 @@ +using System; + namespace Lucene.Net.Search.Similarities { /* @@ -110,7 +112,7 @@ namespace Lucene.Net.Search.Similarities { if (basicModel == null || afterEffect == null || normalization == null) { - throw new System.NullReferenceException("null parameters not allowed."); + throw new NullReferenceException("null parameters not allowed."); } this.m_basicModel = basicModel; this.m_afterEffect = afterEffect; diff --git a/src/Lucene.Net/Search/Weight.cs b/src/Lucene.Net/Search/Weight.cs index 3d974c4..3168f05 100644 --- a/src/Lucene.Net/Search/Weight.cs +++ b/src/Lucene.Net/Search/Weight.cs @@ -1,3 +1,4 @@ +using System; using System.IO; namespace Lucene.Net.Search @@ -148,11 +149,7 @@ namespace Lucene.Net.Search public DefaultBulkScorer(Scorer scorer) { - if (scorer == null) - { - throw new System.NullReferenceException(); - } - this.scorer = scorer; + this.scorer = scorer ?? throw new NullReferenceException(); } public override bool Score(ICollector collector, int max) diff --git a/src/Lucene.Net/Store/FSDirectory.cs b/src/Lucene.Net/Store/FSDirectory.cs index a13cb26..ecfdf1c 100644 --- a/src/Lucene.Net/Store/FSDirectory.cs +++ b/src/Lucene.Net/Store/FSDirectory.cs @@ -6,6 +6,9 @@ using System.Globalization; using System.IO; using System.Linq;// Used only for WRITE_LOCK_NAME in deprecated create=true case: using System.Runtime.CompilerServices; +using System.Security; +using System.Threading; +using System.Threading.Tasks; namespace Lucene.Net.Store { @@ -52,8 +55,8 @@ namespace Lucene.Net.Store /// href="http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6265734">Sun /// JRE bug</a> this is a poor choice for Windows, but /// on all other platforms this is the preferred - /// choice. Applications using <see cref="System.Threading.Thread.Interrupt()"/> or - /// <see cref="System.Threading.Tasks.Task{TResult}"/> should use + /// choice. Applications using <see cref="Thread.Interrupt()"/> or + /// <see cref="Task{TResult}"/> should use /// <see cref="SimpleFSDirectory"/> instead. See <see cref="NIOFSDirectory"/> java doc /// for details.</description></item> /// @@ -64,8 +67,8 @@ namespace Lucene.Net.Store /// running on a 32 bit runtime but your index sizes are /// small enough to fit into the virtual memory space. /// <para/> - /// Applications using <see cref="System.Threading.Thread.Interrupt()"/> or - /// <see cref="System.Threading.Tasks.Task"/> should use + /// Applications using <see cref="Thread.Interrupt()"/> or + /// <see cref="Task{TResult}"/> should use /// <see cref="SimpleFSDirectory"/> instead. See <see cref="MMapDirectory"/> /// doc for details.</description></item> /// </list> @@ -232,7 +235,7 @@ namespace Lucene.Net.Store /// <exception cref="DirectoryNotFoundException"> if the directory /// does not exist, or does exist but is not a /// directory or is invalid (for example, it is on an unmapped drive). </exception> - /// <exception cref="System.Security.SecurityException">The caller does not have the required permission.</exception> + /// <exception cref="SecurityException">The caller does not have the required permission.</exception> public static string[] ListAll(DirectoryInfo dir) { if (!System.IO.Directory.Exists(dir.FullName)) diff --git a/src/Lucene.Net/Store/RateLimitedDirectoryWrapper.cs b/src/Lucene.Net/Store/RateLimitedDirectoryWrapper.cs index 4134b02..08bc05a 100644 --- a/src/Lucene.Net/Store/RateLimitedDirectoryWrapper.cs +++ b/src/Lucene.Net/Store/RateLimitedDirectoryWrapper.cs @@ -1,3 +1,4 @@ +using System; using System.Collections.Concurrent; using System.Collections.Generic; using System.Diagnostics; @@ -87,7 +88,7 @@ namespace Lucene.Net.Store /// <para/> /// @lucene.experimental /// </summary> - /// <exception cref="System.ObjectDisposedException"> if the <see cref="Directory"/> is already disposed + /// <exception cref="ObjectDisposedException"> if the <see cref="Directory"/> is already disposed /// </exception> public void SetMaxWriteMBPerSec(double? mbPerSec, IOContext.UsageContext context) { @@ -132,7 +133,7 @@ namespace Lucene.Net.Store /// <para/> /// @lucene.experimental /// </summary> - /// <exception cref="System.ObjectDisposedException"> if the <see cref="Directory"/> is already disposed + /// <exception cref="ObjectDisposedException"> if the <see cref="Directory"/> is already disposed /// </exception> public void SetRateLimiter(RateLimiter mergeWriteRateLimiter, IOContext.UsageContext context) { @@ -145,7 +146,7 @@ namespace Lucene.Net.Store /// <para/> /// @lucene.experimental /// </summary> - /// <exception cref="System.ObjectDisposedException"> if the <see cref="Directory"/> is already disposed + /// <exception cref="ObjectDisposedException"> if the <see cref="Directory"/> is already disposed /// </exception> public double GetMaxWriteMBPerSec(IOContext.UsageContext context) { diff --git a/src/Lucene.Net/Support/ConcurrentHashSet.cs b/src/Lucene.Net/Support/ConcurrentHashSet.cs index 389f1c4..60a18d6 100644 --- a/src/Lucene.Net/Support/ConcurrentHashSet.cs +++ b/src/Lucene.Net/Support/ConcurrentHashSet.cs @@ -282,7 +282,7 @@ namespace Lucene.Net.Support /// <param name="item">The item to add.</param> /// <returns>true if the items was added to the <see cref="ConcurrentHashSet{T}"/> /// successfully; false if it already exists.</returns> - /// <exception cref="T:System.OverflowException">The <see cref="ConcurrentHashSet{T}"/> + /// <exception cref="T:OverflowException">The <see cref="ConcurrentHashSet{T}"/> /// contains too many items.</exception> public bool Add(T item) => AddInternal(item, _comparer.GetHashCode(item), true); diff --git a/src/Lucene.Net/Support/Document/Extensions/DocumentExtensions.cs b/src/Lucene.Net/Support/Document/Extensions/DocumentExtensions.cs index a70d096..8e43620 100644 --- a/src/Lucene.Net/Support/Document/Extensions/DocumentExtensions.cs +++ b/src/Lucene.Net/Support/Document/Extensions/DocumentExtensions.cs @@ -35,7 +35,7 @@ namespace Lucene.Net.Documents.Extensions /// </summary> /// <param name="document">This <see cref="Document"/>.</param> /// <param name="name">Field name</param> - /// <exception cref="System.InvalidCastException">If the field type cannot be cast to <typeparamref name="T"/>.</exception> + /// <exception cref="InvalidCastException">If the field type cannot be cast to <typeparamref name="T"/>.</exception> public static T GetField<T>(this Document document, string name) where T : IIndexableField { return (T)document.GetField(name); @@ -49,7 +49,7 @@ namespace Lucene.Net.Documents.Extensions /// <param name="document">This <see cref="Document"/>.</param> /// <param name="name"> the name of the field </param> /// <returns> a <see cref="T:IndexableField[]"/> array </returns> - /// <exception cref="System.InvalidCastException">If the field type cannot be cast to <typeparam name="T"/>.</exception> + /// <exception cref="InvalidCastException">If the field type cannot be cast to <typeparam name="T"/>.</exception> public static T[] GetFields<T>(this Document document, string name) where T : IIndexableField { var fields = document.GetFields(name); diff --git a/src/Lucene.Net/Util/ArrayUtil.cs b/src/Lucene.Net/Util/ArrayUtil.cs index 610cad5..b13b0c0 100644 --- a/src/Lucene.Net/Util/ArrayUtil.cs +++ b/src/Lucene.Net/Util/ArrayUtil.cs @@ -97,17 +97,17 @@ namespace Lucene.Net.Util int minRadix = 2, maxRadix = 36; if (chars == null || radix < minRadix || radix > maxRadix) { - throw new System.FormatException(); + throw new FormatException(); } int i = 0; if (len == 0) { - throw new System.FormatException("chars length is 0"); + throw new FormatException("chars length is 0"); } bool negative = chars[offset + i] == '-'; if (negative && ++i == len) { - throw new System.FormatException("can't convert to an int"); + throw new FormatException("can't convert to an int"); } if (negative == true) { @@ -123,19 +123,19 @@ namespace Lucene.Net.Util int result = 0; for (int i = 0; i < len; i++) { - int digit = (int)System.Char.GetNumericValue(chars[i + offset]); + int digit = (int)char.GetNumericValue(chars[i + offset]); if (digit == -1) { - throw new System.FormatException("Unable to parse"); + throw new FormatException("Unable to parse"); } if (max > result) { - throw new System.FormatException("Unable to parse"); + throw new FormatException("Unable to parse"); } int next = result * radix - digit; if (next > result) { - throw new System.FormatException("Unable to parse"); + throw new FormatException("Unable to parse"); } result = next; } @@ -146,7 +146,7 @@ namespace Lucene.Net.Util result = -result; if (result < 0) { - throw new System.FormatException("Unable to parse"); + throw new FormatException("Unable to parse"); } } return result; diff --git a/src/Lucene.Net/Util/Automaton/RegExp.cs b/src/Lucene.Net/Util/Automaton/RegExp.cs index 06ba550..67e4c22 100644 --- a/src/Lucene.Net/Util/Automaton/RegExp.cs +++ b/src/Lucene.Net/Util/Automaton/RegExp.cs @@ -1263,7 +1263,7 @@ namespace Lucene.Net.Util.Automaton return MakeInterval(imin, imax, digits); } #pragma warning disable 168 - catch (System.FormatException e) + catch (FormatException e) #pragma warning restore 168 { throw new ArgumentException("interval syntax error at position " + (pos - 1), e); diff --git a/src/Lucene.Net/Util/BytesRefArray.cs b/src/Lucene.Net/Util/BytesRefArray.cs index f832be6..ac798af 100644 --- a/src/Lucene.Net/Util/BytesRefArray.cs +++ b/src/Lucene.Net/Util/BytesRefArray.cs @@ -103,7 +103,7 @@ namespace Lucene.Net.Util pool.ReadBytes(offset, spare.Bytes, spare.Offset, spare.Length); return spare; } - throw new System.IndexOutOfRangeException("index " + index + " must be less than the size: " + lastElement); + throw new IndexOutOfRangeException("index " + index + " must be less than the size: " + lastElement); } private int[] Sort(IComparer<BytesRef> comp) diff --git a/src/Lucene.Net/Util/CharsRef.cs b/src/Lucene.Net/Util/CharsRef.cs index 0301738..76c9704 100644 --- a/src/Lucene.Net/Util/CharsRef.cs +++ b/src/Lucene.Net/Util/CharsRef.cs @@ -281,7 +281,7 @@ namespace Lucene.Net.Util // // NOTE: must do a real check here to meet the specs of CharSequence // if (index < 0 || index >= Length) // { - // throw new System.IndexOutOfRangeException(); + // throw new IndexOutOfRangeException(); // } // return Chars[Offset + index]; //} @@ -305,7 +305,7 @@ namespace Lucene.Net.Util // NOTE: must do a real check here to meet the specs of CharSequence //if (start < 0 || end > Length || start > end) //{ - // throw new System.IndexOutOfRangeException(); + // throw new IndexOutOfRangeException(); //} // LUCENENET specific - changed semantics from start/end to startIndex/length to match .NET diff --git a/src/Lucene.Net/Util/CommandLineUtil.cs b/src/Lucene.Net/Util/CommandLineUtil.cs index e3f5e31..10d9129 100644 --- a/src/Lucene.Net/Util/CommandLineUtil.cs +++ b/src/Lucene.Net/Util/CommandLineUtil.cs @@ -1,5 +1,6 @@ using System; using System.IO; +using System.Reflection; namespace Lucene.Net.Util { @@ -48,7 +49,7 @@ namespace Lucene.Net.Util { throw new ArgumentException(typeof(FSDirectory).Name + " implementation not found: " + clazzName, e); } - catch (System.InvalidCastException e) + catch (InvalidCastException e) { throw new ArgumentException(clazzName + " is not a " + typeof(FSDirectory).Name + " implementation", e); } @@ -66,7 +67,7 @@ namespace Lucene.Net.Util /// Loads a specific <see cref="Directory"/> implementation. </summary> /// <param name="clazzName"> The name of the <see cref="Directory"/> class to load. </param> /// <returns> The <see cref="Directory"/> class loaded. </returns> - /// <exception cref="System.TypeLoadException"> If the specified class cannot be found. </exception> + /// <exception cref="TypeLoadException"> If the specified class cannot be found. </exception> public static Type LoadDirectoryClass(string clazzName) { return Type.GetType(AdjustDirectoryClassName(clazzName)); @@ -76,7 +77,7 @@ namespace Lucene.Net.Util /// Loads a specific <see cref="FSDirectory"/> implementation. </summary> /// <param name="clazzName"> The name of the <see cref="FSDirectory"/> class to load. </param> /// <returns> The <see cref="FSDirectory"/> class loaded. </returns> - /// <exception cref="System.TypeLoadException"> If the specified class cannot be found. </exception> + /// <exception cref="TypeLoadException"> If the specified class cannot be found. </exception> public static Type LoadFSDirectoryClass(string clazzName) { return Type.GetType(AdjustDirectoryClassName(clazzName)); @@ -108,7 +109,7 @@ namespace Lucene.Net.Util /// <exception cref="MissingMethodException"> If the <see cref="Directory"/> does not have a constructor that takes <see cref="DirectoryInfo"/>. </exception> /// <exception cref="MemberAccessException"> If the class is abstract or an interface. </exception> /// <exception cref="TypeLoadException"> If the constructor does not have public visibility. </exception> - /// <exception cref="System.Reflection.TargetInvocationException"> If the constructor throws an exception </exception> + /// <exception cref="TargetInvocationException"> If the constructor throws an exception </exception> public static FSDirectory NewFSDirectory(Type clazz, DirectoryInfo dir) { // Assuming every FSDirectory has a ctor(File): diff --git a/src/Lucene.Net/Util/FieldCacheSanityChecker.cs b/src/Lucene.Net/Util/FieldCacheSanityChecker.cs index 5b002e3..de64801 100644 --- a/src/Lucene.Net/Util/FieldCacheSanityChecker.cs +++ b/src/Lucene.Net/Util/FieldCacheSanityChecker.cs @@ -319,7 +319,7 @@ namespace Lucene.Net.Util } } } - catch (System.ObjectDisposedException) + catch (ObjectDisposedException) { // ignore this reader } diff --git a/src/Lucene.Net/Util/NumericUtils.cs b/src/Lucene.Net/Util/NumericUtils.cs index 38582dd..d49a151 100644 --- a/src/Lucene.Net/Util/NumericUtils.cs +++ b/src/Lucene.Net/Util/NumericUtils.cs @@ -220,7 +220,7 @@ namespace Lucene.Net.Util int shift = val.Bytes[val.Offset] - SHIFT_START_INT64; if (shift > 63 || shift < 0) { - throw new System.FormatException("Invalid shift value (" + shift + ") in prefixCoded bytes (is encoded value really an INT?)"); + throw new FormatException("Invalid shift value (" + shift + ") in prefixCoded bytes (is encoded value really an INT?)"); } return shift; } @@ -238,7 +238,7 @@ namespace Lucene.Net.Util int shift = val.Bytes[val.Offset] - SHIFT_START_INT32; if (shift > 31 || shift < 0) { - throw new System.FormatException("Invalid shift value in prefixCoded bytes (is encoded value really an INT?)"); + throw new FormatException("Invalid shift value in prefixCoded bytes (is encoded value really an INT?)"); } return shift; } @@ -262,7 +262,7 @@ namespace Lucene.Net.Util var b = val.Bytes[i]; if (b < 0) { - throw new System.FormatException("Invalid prefixCoded numerical value representation (byte " + (b & 0xff).ToString("x") + " at position " + (i - val.Offset) + " is invalid)"); + throw new FormatException("Invalid prefixCoded numerical value representation (byte " + (b & 0xff).ToString("x") + " at position " + (i - val.Offset) + " is invalid)"); } sortableBits |= (byte)b; } @@ -288,7 +288,7 @@ namespace Lucene.Net.Util var b = val.Bytes[i]; if (b < 0) { - throw new System.FormatException("Invalid prefixCoded numerical value representation (byte " + (b & 0xff).ToString("x") + " at position " + (i - val.Offset) + " is invalid)"); + throw new FormatException("Invalid prefixCoded numerical value representation (byte " + (b & 0xff).ToString("x") + " at position " + (i - val.Offset) + " is invalid)"); } sortableBits |= b; } diff --git a/src/Lucene.Net/Util/Packed/Packed16ThreeBlocks.cs b/src/Lucene.Net/Util/Packed/Packed16ThreeBlocks.cs index a152c90..d5579ab 100644 --- a/src/Lucene.Net/Util/Packed/Packed16ThreeBlocks.cs +++ b/src/Lucene.Net/Util/Packed/Packed16ThreeBlocks.cs @@ -41,7 +41,7 @@ namespace Lucene.Net.Util.Packed { if (valueCount > MAX_SIZE) { - throw new System.IndexOutOfRangeException("MAX_SIZE exceeded"); + throw new IndexOutOfRangeException("MAX_SIZE exceeded"); } blocks = new short[valueCount * 3]; } diff --git a/src/Lucene.Net/Util/Packed/Packed8ThreeBlocks.cs b/src/Lucene.Net/Util/Packed/Packed8ThreeBlocks.cs index 5fe7079..a5a08ae 100644 --- a/src/Lucene.Net/Util/Packed/Packed8ThreeBlocks.cs +++ b/src/Lucene.Net/Util/Packed/Packed8ThreeBlocks.cs @@ -41,7 +41,7 @@ namespace Lucene.Net.Util.Packed { if (valueCount > MAX_SIZE) { - throw new System.IndexOutOfRangeException("MAX_SIZE exceeded"); + throw new IndexOutOfRangeException("MAX_SIZE exceeded"); } blocks = new byte[valueCount * 3]; } diff --git a/src/dotnet/Lucene.Net.Replicator.AspNetCore/AspNetCoreReplicationRequest.cs b/src/dotnet/Lucene.Net.Replicator.AspNetCore/AspNetCoreReplicationRequest.cs index b3cef44..61893bb 100644 --- a/src/dotnet/Lucene.Net.Replicator.AspNetCore/AspNetCoreReplicationRequest.cs +++ b/src/dotnet/Lucene.Net.Replicator.AspNetCore/AspNetCoreReplicationRequest.cs @@ -1,5 +1,6 @@ using Lucene.Net.Replicator.Http.Abstractions; using Microsoft.AspNetCore.Http; +using System; using System.Linq; namespace Lucene.Net.Replicator.AspNetCore @@ -52,7 +53,7 @@ namespace Lucene.Net.Replicator.AspNetCore /// </summary> /// <param name="name">the name of the requested parameter</param> /// <returns>the value of the requested parameter or null if not present</returns> - /// <exception cref="System.InvalidOperationException">More than one parameter with the name was given.</exception> + /// <exception cref="InvalidOperationException">More than one parameter with the name was given.</exception> public string QueryParam(string name) { return request.Query[name].SingleOrDefault();
