You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucenenet.apache.org by ni...@apache.org on 2017/01/26 11:12:23 UTC

[10/11] lucenenet git commit: Lucene.Net.Expressions.ScoreValueSource.GetHashCode(): Corrected implementation to use RuntimeHelpers.GetHashCode(this), the .NET equivalent of Java's System.identityHashCode(this).

Lucene.Net.Expressions.ScoreValueSource.GetHashCode(): Corrected implementation to use RuntimeHelpers.GetHashCode(this), the .NET equivalent of Java's System.identityHashCode(this).


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

Branch: refs/heads/api-work
Commit: 90d6473726f2abc316c9334dbe9d2e91872a6699
Parents: 57d0d27
Author: Shad Storhaug <sh...@shadstorhaug.com>
Authored: Thu Jan 26 16:59:41 2017 +0700
Committer: Shad Storhaug <sh...@shadstorhaug.com>
Committed: Thu Jan 26 16:59:41 2017 +0700

----------------------------------------------------------------------
 src/Lucene.Net.Expressions/ScoreValueSource.cs | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/lucenenet/blob/90d64737/src/Lucene.Net.Expressions/ScoreValueSource.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Expressions/ScoreValueSource.cs b/src/Lucene.Net.Expressions/ScoreValueSource.cs
index f825663..ad406cd 100644
--- a/src/Lucene.Net.Expressions/ScoreValueSource.cs
+++ b/src/Lucene.Net.Expressions/ScoreValueSource.cs
@@ -3,6 +3,7 @@ using Lucene.Net.Queries.Function;
 using Lucene.Net.Search;
 using System;
 using System.Collections;
+using System.Runtime.CompilerServices;
 
 namespace Lucene.Net.Expressions
 {
@@ -53,7 +54,7 @@ namespace Lucene.Net.Expressions
 
 		public override int GetHashCode()
 		{
-		    return 777; // LUCENENET TODO: return RuntimeHelpers.GetHashCode(this);
+		    return RuntimeHelpers.GetHashCode(this); // LUCENENET NOTE: This is equivalent to System.identityHashCode(this) in Java
 		}
 
 		public override string GetDescription()