lucenenet-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From synhers...@apache.org
Subject [07/46] lucenenet git commit: Fixed wrong exception thrown from Facet.SortedSet.SortedSetDocValuesFacetCounts as well as the wrong expected exception in its test.
Date Tue, 04 Oct 2016 20:01:37 GMT
Fixed wrong exception thrown from Facet.SortedSet.SortedSetDocValuesFacetCounts as well as
the wrong expected exception in its test.


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

Branch: refs/heads/master
Commit: 4b87de01204d603d2de96e04fba6a62425bf6381
Parents: abf096e
Author: Shad Storhaug <shad@shadstorhaug.com>
Authored: Sat Sep 24 19:19:06 2016 +0700
Committer: Shad Storhaug <shad@shadstorhaug.com>
Committed: Mon Oct 3 23:30:46 2016 +0700

----------------------------------------------------------------------
 src/Lucene.Net.Facet/SortedSet/SortedSetDocValuesFacetCounts.cs  | 4 +---
 .../SortedSet/TestSortedSetDocValuesFacets.cs                    | 2 +-
 2 files changed, 2 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/lucenenet/blob/4b87de01/src/Lucene.Net.Facet/SortedSet/SortedSetDocValuesFacetCounts.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Facet/SortedSet/SortedSetDocValuesFacetCounts.cs b/src/Lucene.Net.Facet/SortedSet/SortedSetDocValuesFacetCounts.cs
index 8ccb190..509b473 100644
--- a/src/Lucene.Net.Facet/SortedSet/SortedSetDocValuesFacetCounts.cs
+++ b/src/Lucene.Net.Facet/SortedSet/SortedSetDocValuesFacetCounts.cs
@@ -1,8 +1,6 @@
 ´╗┐using System;
 using System.Collections.Generic;
 using System.Linq;
-using System.Threading;
-using Lucene.Net.Facet;
 
 namespace Lucene.Net.Facet.SortedSet
 {
@@ -191,7 +189,7 @@ namespace Lucene.Net.Facet.SortedSet
                 // AIOOBE can happen:
                 if (!Equals(ReaderUtil.GetTopLevelContext(hits.context).Reader, origReader))
                 {
-                    throw new ThreadStateException("the SortedSetDocValuesReaderState provided
to this class does not match the reader being searched; you must create a new SortedSetDocValuesReaderState
every time you open a new IndexReader");
+                    throw new InvalidOperationException("the SortedSetDocValuesReaderState
provided to this class does not match the reader being searched; you must create a new SortedSetDocValuesReaderState
every time you open a new IndexReader");
                 }
 
                 SortedSetDocValues segValues = reader.GetSortedSetDocValues(field);

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/4b87de01/src/Lucene.Net.Tests.Facet/SortedSet/TestSortedSetDocValuesFacets.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests.Facet/SortedSet/TestSortedSetDocValuesFacets.cs b/src/Lucene.Net.Tests.Facet/SortedSet/TestSortedSetDocValuesFacets.cs
index 7b42c55..75cf9d3 100644
--- a/src/Lucene.Net.Tests.Facet/SortedSet/TestSortedSetDocValuesFacets.cs
+++ b/src/Lucene.Net.Tests.Facet/SortedSet/TestSortedSetDocValuesFacets.cs
@@ -135,7 +135,7 @@ namespace Lucene.Net.Facet.SortedSet
                 new SortedSetDocValuesFacetCounts(state, c);
                 Fail("did not hit expected exception");
             }
-            catch (IllegalStateException)
+            catch (InvalidOperationException)
             {
                 // expected
             }


Mime
View raw message