Start adding implementations for runtime-provided native methods.
The library can't do everything...
Change-Id: Ib808c00570c7214aeb2ca058b1a66cacbeb372f1
diff --git a/src/check_jni.cc b/src/check_jni.cc
index eb829a0..88f3fec 100644
--- a/src/check_jni.cc
+++ b/src/check_jni.cc
@@ -1196,7 +1196,7 @@
Array* a = Decode<Array*>(ts, java_array);
size_t byte_count = a->GetLength() * a->GetClass()->GetComponentSize();
- void* result = GuardedCopy::create(reinterpret_cast<ByteArray*>(a)->GetData(), byte_count, true);
+ void* result = GuardedCopy::create(a->GetRawData(), byte_count, true);
if (isCopy != NULL) {
*isCopy = JNI_TRUE;
}
@@ -1219,7 +1219,7 @@
if (mode != JNI_ABORT) {
size_t len = GuardedCopy::fromData(dataBuf)->originalLen;
- memcpy(reinterpret_cast<ByteArray*>(a)->GetData(), dataBuf, len);
+ memcpy(a->GetRawData(), dataBuf, len);
}
if (mode != JNI_COMMIT) {
GuardedCopy::destroy(dataBuf);