adoroszlai commented on code in PR #7135:
URL: https://github.com/apache/ozone/pull/7135#discussion_r1737930363


##########
hadoop-hdds/common/src/main/java/org/apache/hadoop/ozone/common/ChecksumByteBufferImpl.java:
##########
@@ -44,12 +44,14 @@ public class ChecksumByteBufferImpl implements 
ChecksumByteBuffer {
 
   static {
     Field f = null;
-    try {
-      f = ByteBuffer.class
-          .getDeclaredField("isReadOnly");
-      f.setAccessible(true);
-    } catch (NoSuchFieldException e) {
-      LOG.error("No isReadOnly field in ByteBuffer", e);
+    if (JavaUtils.isJavaVersionAtMost(8)) {

Review Comment:
   This is basically an `else` branch for `isJavaVersionAtLeast(9)`. ;)



-- 
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]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to