lucenenet-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From synhers...@apache.org
Subject [25/26] lucenenet git commit: More explicit Equals
Date Fri, 14 Nov 2014 11:59:40 GMT
More explicit Equals


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

Branch: refs/heads/master
Commit: 712ea2e0d7c075f8357b082032dcef5c384d260e
Parents: 58ccdea
Author: Itamar Syn-Hershko <itamar@code972.com>
Authored: Fri Nov 14 13:17:04 2014 +0200
Committer: Itamar Syn-Hershko <itamar@code972.com>
Committed: Fri Nov 14 13:17:04 2014 +0200

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


http://git-wip-us.apache.org/repos/asf/lucenenet/blob/712ea2e0/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 3a66bd3..d553af6 100644
--- a/src/Lucene.Net.Core/Search/Query.cs
+++ b/src/Lucene.Net.Core/Search/Query.cs
@@ -129,10 +129,11 @@ namespace Lucene.Net.Search
 
         public override bool Equals(object obj)
         {
-            if (this == obj)
+            if (ReferenceEquals(obj, this))
             {
                 return true;
             }
+
             var other = obj as Query;
             if (other == null)
             {


Mime
View raw message