Skip to content

Commit 1c555d7

Browse files
committed
Rather than deprecating the method,
let it just call the method with the offset.
1 parent 5d127c5 commit 1c555d7

1 file changed

Lines changed: 8 additions & 6 deletions

File tree

src/main/java/org/apache/datasketches/common/ArrayOfItemsSerDe.java

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -48,19 +48,21 @@ public abstract class ArrayOfItemsSerDe<T> {
4848
public abstract byte[] serializeToByteArray(T[] items);
4949

5050
/**
51-
* Deserialize a contiguous sequence of serialized items from a given Memory.
51+
* Deserialize a contiguous sequence of serialized items from the given Memory
52+
* starting at a Memory offset of zero and extending numItems.
5253
*
5354
* @param mem Memory containing a contiguous sequence of serialized items
5455
* @param numItems number of items in the contiguous serialized sequence.
5556
* @return array of deserialized items
56-
* @deprecated use
57-
* {@link #deserializeFromMemory(Memory, long, int) deserializeFromMemory(mem, offset, numItems)}
57+
* @see #deserializeFromMemory(Memory, long, int)
5858
*/
59-
@Deprecated
60-
public abstract T[] deserializeFromMemory(Memory mem, int numItems);
59+
public T[] deserializeFromMemory(final Memory mem, final int numItems) {
60+
return deserializeFromMemory(mem, 0, numItems);
61+
}
6162

6263
/**
63-
* Deserialize a contiguous sequence of serialized items from a given Memory.
64+
* Deserialize a contiguous sequence of serialized items from the given Memory
65+
* starting at the given Memory <i>offsetBytes</i> and extending numItems.
6466
*
6567
* @param mem Memory containing a contiguous sequence of serialized items
6668
* @param offsetBytes the starting offset in the given Memory.

0 commit comments

Comments
 (0)