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

leerho pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/datasketches-java.git


The following commit(s) were added to refs/heads/master by this push:
     new 1c555d72 Rather than deprecating the method,
1c555d72 is described below

commit 1c555d72f319bdd50b5abf3accfaff3e422cae4b
Author: Lee Rhodes <[email protected]>
AuthorDate: Wed Apr 17 12:34:32 2024 -0700

    Rather than deprecating the method,
    
    let it just call the method with the offset.
---
 .../org/apache/datasketches/common/ArrayOfItemsSerDe.java  | 14 ++++++++------
 1 file changed, 8 insertions(+), 6 deletions(-)

diff --git 
a/src/main/java/org/apache/datasketches/common/ArrayOfItemsSerDe.java 
b/src/main/java/org/apache/datasketches/common/ArrayOfItemsSerDe.java
index fdd14bd9..c9438b61 100644
--- a/src/main/java/org/apache/datasketches/common/ArrayOfItemsSerDe.java
+++ b/src/main/java/org/apache/datasketches/common/ArrayOfItemsSerDe.java
@@ -48,19 +48,21 @@ public abstract class ArrayOfItemsSerDe<T> {
   public abstract byte[] serializeToByteArray(T[] items);
 
   /**
-   * Deserialize a contiguous sequence of serialized items from a given Memory.
+   * Deserialize a contiguous sequence of serialized items from the given 
Memory
+   * starting at a Memory offset of zero and extending numItems.
    *
    * @param mem Memory containing a contiguous sequence of serialized items
    * @param numItems number of items in the contiguous serialized sequence.
    * @return array of deserialized items
-   * @deprecated use
-   * {@link #deserializeFromMemory(Memory, long, int) 
deserializeFromMemory(mem, offset, numItems)}
+   * @see #deserializeFromMemory(Memory, long, int)
    */
-  @Deprecated
-  public abstract T[] deserializeFromMemory(Memory mem, int numItems);
+  public T[] deserializeFromMemory(final Memory mem, final int numItems) {
+    return deserializeFromMemory(mem, 0, numItems);
+  }
 
   /**
-   * Deserialize a contiguous sequence of serialized items from a given Memory.
+   * Deserialize a contiguous sequence of serialized items from the given 
Memory
+   * starting at the given Memory <i>offsetBytes</i> and extending numItems.
    *
    * @param mem Memory containing a contiguous sequence of serialized items
    * @param offsetBytes the starting offset in the given Memory.


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to