Amend HBASE-15322 Operations using Unsafe path broken for platforms not having sun.misc.Unsafe

"Object cannot be cast to boolean" in UnsafeAvailChecker
This commit is contained in:
Andrew Purtell 2016-03-11 17:33:44 -08:00
parent eea8b38dfa
commit b6b9910e2c
1 changed files with 1 additions and 1 deletions

View File

@ -56,7 +56,7 @@ public class UnsafeAvailChecker {
Class<?> clazz = Class.forName("java.nio.Bits");
Method m = clazz.getDeclaredMethod("unaligned");
m.setAccessible(true);
unaligned = (boolean) m.invoke(null);
unaligned = (Boolean) m.invoke(null);
} catch (Exception e) {
LOG.warn("java.nio.Bits#unaligned() check failed."
+ "Unsafe based read/write of primitive types won't be used", e);