Apache9 commented on a change in pull request #1113: HBASE-21110 Remove 
`Illegal reflective access` warning for `java.nio.Bits.unaligned()`
URL: https://github.com/apache/hbase/pull/1113#discussion_r373898784
 
 

 ##########
 File path: 
hbase-common/src/main/java/org/apache/hadoop/hbase/util/UnsafeAvailChecker.java
 ##########
 @@ -21,50 +21,64 @@
 import java.lang.reflect.Method;
 import java.security.AccessController;
 import java.security.PrivilegedAction;
+import sun.misc.Unsafe;
 
 import org.apache.yetus.audience.InterfaceAudience;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
+@SuppressWarnings("restriction")
 @InterfaceAudience.Private
 public class UnsafeAvailChecker {
 
+  private static final Unsafe UNSAFE;
 
 Review comment:
   Why this change? I think one of the purpose of this class is to not 
reference Unsafe directly?

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to