< prev index next >

src/hotspot/share/prims/jni.cpp

Print this page
rev 50331 : 8198285: More consistent Access API for arraycopy
rev 50332 : [mq]: JDK-8203232-2.patch
rev 50333 : [mq]: JDK-8198285-3.patch

@@ -2464,11 +2464,11 @@
     buf = NEW_C_HEAP_ARRAY_RETURN_NULL(jchar, s_len + 1, mtInternal);  // add one for zero termination
     /* JNI Specification states return NULL on OOM */
     if (buf != NULL) {
       if (s_len > 0) {
         if (!is_latin1) {
-          ArrayAccess<>::arraycopy_to_native<jchar>(s_value, (size_t) typeArrayOopDesc::element_offset<jchar>(0),
+          ArrayAccess<>::arraycopy_to_native<>(s_value, (size_t) typeArrayOopDesc::element_offset<jchar>(0),
                                                     buf, s_len);
         } else {
           for (int i = 0; i < s_len; i++) {
             buf[i] = ((jchar) s_value->byte_at(i)) & 0xff;
           }

@@ -2721,11 +2721,11 @@
   } else { \
     /* JNI Specification states return NULL on OOM */                    \
     result = NEW_C_HEAP_ARRAY_RETURN_NULL(ElementType, len, mtInternal); \
     if (result != NULL) {                                                \
       /* copy the array to the c chunk */                                \
-      ArrayAccess<>::arraycopy_to_native<ElementType>(a, typeArrayOopDesc::element_offset<ElementType>(0), \
+      ArrayAccess<>::arraycopy_to_native<>(a, typeArrayOopDesc::element_offset<ElementType>(0), \
                                                       result, len);       \
       if (isCopy) {                                                      \
         *isCopy = JNI_TRUE;                                              \
       }                                                                  \
     }                                                                    \

@@ -2771,11 +2771,11 @@
   EntryProbe; \
   typeArrayOop a = typeArrayOop(JNIHandles::resolve_non_null(array)); \
   int len = a->length(); \
   if (len != 0) {   /* Empty array:  nothing to free or copy. */  \
     if ((mode == 0) || (mode == JNI_COMMIT)) { \
-      ArrayAccess<>::arraycopy_from_native<ElementType>(buf, a, typeArrayOopDesc::element_offset<ElementType>(0), len); \
+      ArrayAccess<>::arraycopy_from_native<>(buf, a, typeArrayOopDesc::element_offset<ElementType>(0), len); \
     } \
     if ((mode == 0) || (mode == JNI_ABORT)) { \
       FreeHeap(buf); \
     } \
   } \

@@ -2822,11 +2822,11 @@
   typeArrayOop src = typeArrayOop(JNIHandles::resolve_non_null(array)); \
   if (start < 0 || len < 0 || (start > src->length() - len)) { \
     THROW(vmSymbols::java_lang_ArrayIndexOutOfBoundsException()); \
   } else { \
     if (len > 0) { \
-      ArrayAccess<>::arraycopy_to_native<ElementType>(src, typeArrayOopDesc::element_offset<ElementType>(start), buf, len); \
+      ArrayAccess<>::arraycopy_to_native<>(src, typeArrayOopDesc::element_offset<ElementType>(start), buf, len); \
     } \
   } \
 JNI_END
 
 DEFINE_GETSCALARARRAYREGION(T_BOOLEAN, jboolean,Boolean, bool

@@ -2869,11 +2869,11 @@
   typeArrayOop dst = typeArrayOop(JNIHandles::resolve_non_null(array)); \
   if (start < 0 || len < 0 || (start > dst->length() - len)) { \
     THROW(vmSymbols::java_lang_ArrayIndexOutOfBoundsException()); \
   } else { \
     if (len > 0) { \
-      ArrayAccess<>::arraycopy_from_native<ElementType>(buf, dst, typeArrayOopDesc::element_offset<ElementType>(start), len); \
+      ArrayAccess<>::arraycopy_from_native<>(buf, dst, typeArrayOopDesc::element_offset<ElementType>(start), len); \
     } \
   } \
 JNI_END
 
 DEFINE_SETSCALARARRAYREGION(T_BOOLEAN, jboolean, Boolean, bool

@@ -3105,11 +3105,11 @@
   } else {
     if (len > 0) {
       typeArrayOop s_value = java_lang_String::value(s);
       bool is_latin1 = java_lang_String::is_latin1(s);
       if (!is_latin1) {
-        ArrayAccess<>::arraycopy_to_native<jchar>(s_value, typeArrayOopDesc::element_offset<jchar>(start),
+        ArrayAccess<>::arraycopy_to_native<>(s_value, typeArrayOopDesc::element_offset<jchar>(start),
                                                   buf, len);
       } else {
         for (int i = 0; i < len; i++) {
           buf[i] = ((jchar) s_value->byte_at(i + start)) & 0xff;
         }
< prev index next >