lucenenet-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From nightowl...@apache.org
Subject [lucenenet] 02/13: Lucene.Net.TestFramework.Codecs.Lucene3x.PreFlexRWNormsConsumer: Changed exceptions from InvalidOperationException to AssertionExeption (as they were in Lucene)
Date Sat, 26 Oct 2019 18:51:57 GMT
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 2d29c1e17a881e9eae4210e8aa7ca89437ae1dc6
Author: Shad Storhaug <shad@shadstorhaug.com>
AuthorDate: Sun Oct 27 00:32:50 2019 +0700

    Lucene.Net.TestFramework.Codecs.Lucene3x.PreFlexRWNormsConsumer: Changed exceptions from
InvalidOperationException to AssertionExeption (as they were in Lucene)
---
 .../Codecs/Lucene3x/PreFlexRWNormsConsumer.cs                      | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/src/Lucene.Net.TestFramework/Codecs/Lucene3x/PreFlexRWNormsConsumer.cs b/src/Lucene.Net.TestFramework/Codecs/Lucene3x/PreFlexRWNormsConsumer.cs
index d18b95e..2e78a86 100644
--- a/src/Lucene.Net.TestFramework/Codecs/Lucene3x/PreFlexRWNormsConsumer.cs
+++ b/src/Lucene.Net.TestFramework/Codecs/Lucene3x/PreFlexRWNormsConsumer.cs
@@ -1,5 +1,6 @@
 using System;
 using Debug = Lucene.Net.Diagnostics.Debug; // LUCENENET NOTE: We cannot use System.Diagnostics.Debug
because those calls will be optimized out of the release!
+using AssertionError = Lucene.Net.Diagnostics.AssertionException;
 
 namespace Lucene.Net.Codecs.Lucene3x
 {
@@ -100,17 +101,17 @@ namespace Lucene.Net.Codecs.Lucene3x
 
         public override void AddBinaryField(FieldInfo field, IEnumerable<BytesRef>
values)
         {
-            throw new InvalidOperationException(); // LUCENENET TODO: This should be AssertionError
(AssertionException)
+            throw new AssertionError();
         }
 
         public override void AddSortedField(FieldInfo field, IEnumerable<BytesRef>
values, IEnumerable<long?> docToOrd)
         {
-            throw new InvalidOperationException(); // LUCENENET TODO: This should be AssertionError
(AssertionException)
+            throw new AssertionError();
         }
 
         public override void AddSortedSetField(FieldInfo field, IEnumerable<BytesRef>
values, IEnumerable<long?> docToOrdCount, IEnumerable<long?> ords)
         {
-            throw new InvalidOperationException(); // LUCENENET TODO: This should be AssertionError
(AssertionException)
+            throw new AssertionError();
         }
     }
 }
\ No newline at end of file


Mime
View raw message