lucenenet-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From nightowl...@apache.org
Subject [lucenenet] 24/35: BREAKING: Lucene.Net.Support.CRC32, Lucene.Net.Support.IChecksum, Lucene.Net.Store.BufferedChecksum: Marked internal now to prevent a future breaking change, since the plan is to use HashAlgorithm as a replacement for IChecksum (see LUCENENET-637)
Date Sun, 09 Feb 2020 06:16:16 GMT
This is an automated email from the ASF dual-hosted git repository.

nightowl888 pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/lucenenet.git

commit 6e8897762faf2ab8b9ef4bc485f47db314f12c4f
Author: Shad Storhaug <shad@shadstorhaug.com>
AuthorDate: Sat Feb 8 14:40:12 2020 +0700

    BREAKING: Lucene.Net.Support.CRC32, Lucene.Net.Support.IChecksum, Lucene.Net.Store.BufferedChecksum:
Marked internal now to prevent a future breaking change, since the plan is to use HashAlgorithm
as a replacement for IChecksum (see LUCENENET-637)
---
 src/Lucene.Net/Store/BufferedChecksum.cs | 7 ++++++-
 src/Lucene.Net/Support/CRC32.cs          | 2 +-
 src/Lucene.Net/Support/IChecksum.cs      | 2 +-
 3 files changed, 8 insertions(+), 3 deletions(-)

diff --git a/src/Lucene.Net/Store/BufferedChecksum.cs b/src/Lucene.Net/Store/BufferedChecksum.cs
index b5117e3..0c808ca 100644
--- a/src/Lucene.Net/Store/BufferedChecksum.cs
+++ b/src/Lucene.Net/Store/BufferedChecksum.cs
@@ -24,7 +24,12 @@ namespace Lucene.Net.Store
     /// Wraps another <see cref="IChecksum"/> with an internal buffer
     /// to speed up checksum calculations.
     /// </summary>
-    public class BufferedChecksum : IChecksum
+    // LUCENENET TODO: This class was public in Lucene. Marking internal, since
+    // a better approach would be to map this to the HashAlgorithm abstract class in .NET
+    // instead of using IChecksum from Java. See LUCENENET-637.
+    // After this conversion is done, this can be made public again. However, it is
+    // now internal so the conversion doesn't introduce a breaking public API change.
+    internal class BufferedChecksum : IChecksum
     {
         private readonly IChecksum @in;
         private readonly byte[] buffer;
diff --git a/src/Lucene.Net/Support/CRC32.cs b/src/Lucene.Net/Support/CRC32.cs
index f491e89..0f5f34b 100644
--- a/src/Lucene.Net/Support/CRC32.cs
+++ b/src/Lucene.Net/Support/CRC32.cs
@@ -23,7 +23,7 @@ using System;
 
 namespace Lucene.Net.Support
 {
-    public class CRC32 : IChecksum
+    internal class CRC32 : IChecksum
     {
         private static readonly UInt32[] crcTable = InitializeCRCTable();
 
diff --git a/src/Lucene.Net/Support/IChecksum.cs b/src/Lucene.Net/Support/IChecksum.cs
index 7e502d6..ac7ce00 100644
--- a/src/Lucene.Net/Support/IChecksum.cs
+++ b/src/Lucene.Net/Support/IChecksum.cs
@@ -20,7 +20,7 @@ namespace Lucene.Net.Support
     /// <summary>
     /// Contains conversion support elements such as classes, interfaces and static methods.
     /// </summary>
-    public interface IChecksum
+    internal interface IChecksum
     {
         void Reset();
 


Mime
View raw message