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/02/01 20:21:57 UTC
[avro] branch master updated: AVRO-3345 Made Magic readonly in DataFileConstants (#1495)
This is an automated email from the ASF dual-hosted git repository.
mgrigorov pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/avro.git
The following commit(s) were added to refs/heads/master by this push:
new 18d7495 AVRO-3345 Made Magic readonly in DataFileConstants (#1495)
18d7495 is described below
commit 18d74959d73346f9d1e1fa9dd8881177a1f49233
Author: Kyle Schoonover <ky...@minmaxcorp.com>
AuthorDate: Tue Feb 1 12:21:47 2022 -0800
AVRO-3345 Made Magic readonly in DataFileConstants (#1495)
Co-authored-by: Kyle T. Schoonover <Ky...@nordstrom.com>
---
lang/csharp/src/apache/main/File/DataFileConstants.cs | 14 +++++++-------
1 file changed, 7 insertions(+), 7 deletions(-)
diff --git a/lang/csharp/src/apache/main/File/DataFileConstants.cs b/lang/csharp/src/apache/main/File/DataFileConstants.cs
index 27b034e..b99e0a4 100644
--- a/lang/csharp/src/apache/main/File/DataFileConstants.cs
+++ b/lang/csharp/src/apache/main/File/DataFileConstants.cs
@@ -21,9 +21,6 @@ namespace Avro.File
/// <summary>
/// Constants used in data files.
/// </summary>
- [System.Diagnostics.CodeAnalysis.SuppressMessage("Design",
- "CA1052:Static holder types should be Static or NotInheritable",
- Justification = "Maintain public API")]
public class DataFileConstants
{
/// <summary>
@@ -64,10 +61,13 @@ namespace Avro.File
/// <summary>
/// Magic bytes at the beginning of an Avro data file.
/// </summary>
- public static byte[] Magic = { (byte)'O',
- (byte)'b',
- (byte)'j',
- Version };
+ public static readonly byte[] Magic =
+ {
+ (byte)'O',
+ (byte)'b',
+ (byte)'j',
+ Version,
+ };
/// <summary>
/// Hash code for the null codec.