8198285: More consistent Access API for arraycopy

Reviewed-by: eosterlund, shade
This commit is contained in:
Roman Kennke 2018-06-04 23:01:48 +02:00
parent 9017043b57
commit 482e40cc8c
20 changed files with 357 additions and 149 deletions

View file

@ -87,8 +87,8 @@ Handle SystemDictionaryShared::get_shared_jar_manifest(int shared_path_index, TR
assert(src != NULL, "No Manifest data");
typeArrayOop buf = oopFactory::new_byteArray(size, CHECK_NH);
typeArrayHandle bufhandle(THREAD, buf);
char* dst = (char*)(buf->byte_at_addr(0));
memcpy(dst, src, (size_t)size);
ArrayAccess<>::arraycopy_from_native(reinterpret_cast<const jbyte*>(src),
buf, typeArrayOopDesc::element_offset<jbyte>(0), size);
Handle bais = JavaCalls::construct_new_instance(SystemDictionary::ByteArrayInputStream_klass(),
vmSymbols::byte_array_void_signature(),