ijuma commented on code in PR #12163:
URL: https://github.com/apache/kafka/pull/12163#discussion_r900196059
##########
clients/src/main/java/org/apache/kafka/common/utils/Checksums.java:
##########
@@ -30,21 +36,74 @@
*/
public final class Checksums {
+ private static final Logger LOGGER =
LoggerFactory.getLogger(Checksums.class);
+ private static final MethodHandle BYTE_BUFFER_UPDATE;
+
+ static {
+ MethodHandle byteBufferUpdate = null;
+ if (Java.IS_JAVA9_COMPATIBLE) {
+ try {
+ byteBufferUpdate =
MethodHandles.publicLookup().findVirtual(Checksum.class, "update",
MethodType.methodType(void.class, ByteBuffer.class));
+ } catch (Throwable t) {
+ LOGGER.warn("Cannot uses
java.util.zip.Checksum::update(ByteBuffer): direct ByteBuffers checksum won't
use optimized platform support", t);
Review Comment:
I can make the small changes to help this along if you agree with them. :)
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]