Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix deprecated methods/classes in Core #642

Merged
merged 2 commits into from
Apr 4, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 0 additions & 24 deletions src/main/java/net/openhft/chronicle/core/UnsafeMemory.java
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@

import net.openhft.chronicle.core.internal.Bootstrap;
import net.openhft.chronicle.core.internal.util.DirectBufferUtil;
import net.openhft.chronicle.core.util.Ints;
import net.openhft.chronicle.core.util.MisAlignedAssertionError;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
Expand Down Expand Up @@ -1074,29 +1073,6 @@ public void copyMemory(long srcAddress, long destAddress, long length) {
}
}

/**
* Copies memory from a byte array to an object.
*
* @param src source byte array.
* @param srcOffset offset of the source array from where to start copying.
* @param dest destination object.
* @param destOffset offset of the destination object from where to place the copied memory.
* @param length the length of memory to copy.
*/
@Deprecated(/* for removal in x.26, don't just delete this method, it must be inlined. */)
public void copyMemory(byte[] src, int srcOffset, @Nullable Object dest, long destOffset, int length) {
assert SKIP_ASSERTIONS || nonNull(src);
assert SKIP_ASSERTIONS || srcOffset >= 0;
assert SKIP_ASSERTIONS || destOffset >= 0;
assert SKIP_ASSERTIONS || length >= 0;

if (dest instanceof byte[]) {
copyMemory(src, srcOffset, (byte[]) dest, Math.toIntExact(destOffset - ARRAY_BYTE_BASE_OFFSET), length);
} else {
copyMemoryLoop(src, ARRAY_BYTE_BASE_OFFSET + srcOffset, dest, destOffset, length);
}
}

/**
* Copies memory from one byte array to another.
*
Expand Down

This file was deleted.

Loading