Skip to content

Commit

Permalink
Rather than deprecating the method,
Browse files Browse the repository at this point in the history
let it just call the method with the offset.
  • Loading branch information
leerho committed Apr 17, 2024
1 parent 5d127c5 commit 1c555d7
Showing 1 changed file with 8 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down

1 comment on commit 1c555d7

@jmalkin
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this was an inadvertent commit directly to the main branch, but this is fine. Let's count this as a review comment approving it.

Please sign in to comment.