You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@avro.apache.org by mg...@apache.org on 2022/01/30 20:22:47 UTC

[avro] branch branch-1.11 updated: AVRO-3327 Implemented pattern matching on Equals check (#1478)

This is an automated email from the ASF dual-hosted git repository.

mgrigorov pushed a commit to branch branch-1.11
in repository https://gitbox.apache.org/repos/asf/avro.git


The following commit(s) were added to refs/heads/branch-1.11 by this push:
     new 332e403  AVRO-3327 Implemented pattern matching on Equals check (#1478)
332e403 is described below

commit 332e403d0639490c9ed4b253532bdda137d232f1
Author: Kyle Schoonover <ky...@minmaxcorp.com>
AuthorDate: Sun Jan 30 12:22:21 2022 -0800

    AVRO-3327 Implemented pattern matching on Equals check (#1478)
    
    Co-authored-by: Kyle T. Schoonover <Ky...@nordstrom.com>
    (cherry picked from commit 2af5d7e0116d53ca706b6e5a5f3b45e7d317ef7d)
---
 lang/csharp/src/apache/main/AvroDecimal.cs | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lang/csharp/src/apache/main/AvroDecimal.cs b/lang/csharp/src/apache/main/AvroDecimal.cs
index 5462914..5814b9b 100644
--- a/lang/csharp/src/apache/main/AvroDecimal.cs
+++ b/lang/csharp/src/apache/main/AvroDecimal.cs
@@ -520,7 +520,7 @@ namespace Avro
         /// </returns>
         public override bool Equals(object obj)
         {
-            return (obj is AvroDecimal) && Equals((AvroDecimal)obj);
+            return (obj is AvroDecimal @decimal) && Equals(@decimal);
         }
 
         /// <summary>