Skip to content

Commit

Permalink
Fix deprecated methods/classes in Core (#642)
Browse files Browse the repository at this point in the history
* Fix deprecated methods/classes in Core

* Add -Xlint:all,-options as default compiler
  • Loading branch information
peter-lawrey committed Apr 29, 2024
1 parent 87f873a commit c3a4ceb
Show file tree
Hide file tree
Showing 22 changed files with 13 additions and 2,455 deletions.
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

0 comments on commit c3a4ceb

Please sign in to comment.