lucenenet-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From synhers...@apache.org
Subject [3/3] lucenenet git commit: Bring Query.Equals() to be back in par with the Java impl
Date Mon, 22 Dec 2014 13:10:03 GMT
Bring Query.Equals() to be back in par with the Java impl


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

Branch: refs/heads/master
Commit: c0c101953e14398a8e3f01f185a3ecfcecbc1609
Parents: 583627a
Author: Itamar Syn-Hershko <itamar@code972.com>
Authored: Mon Dec 22 15:09:35 2014 +0200
Committer: Itamar Syn-Hershko <itamar@code972.com>
Committed: Mon Dec 22 15:09:35 2014 +0200

----------------------------------------------------------------------
 src/Lucene.Net.Core/Search/Query.cs | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/lucenenet/blob/c0c10195/src/Lucene.Net.Core/Search/Query.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Core/Search/Query.cs b/src/Lucene.Net.Core/Search/Query.cs
index d553af6..1448093 100644
--- a/src/Lucene.Net.Core/Search/Query.cs
+++ b/src/Lucene.Net.Core/Search/Query.cs
@@ -134,12 +134,17 @@ namespace Lucene.Net.Search
                 return true;
             }
 
+            if (GetType() != obj.GetType())
+            {
+                return false;
+            }
+
             var other = obj as Query;
             if (other == null)
             {
                 return false;
             }
-           
+
             if (Number.FloatToIntBits(Boost) != Number.FloatToIntBits(other.Boost))
             {
                 return false;


Mime
View raw message