Slightly more accurate natives check

This commit is contained in:
Andrew Steinborn
2019-09-07 00:15:10 -04:00
parent 35856fec04
commit 3a77068088

View File

@@ -67,7 +67,7 @@ public class JavaVelocityCipher implements VelocityCipher {
} }
private static ByteBuf toHeap(ByteBuf src) { private static ByteBuf toHeap(ByteBuf src) {
if (!src.isDirect()) { if (src.hasArray()) {
return src.retain(); return src.retain();
} }