< prev index next >
src/hotspot/share/c1/c1_Runtime1.cpp
Print this page
rev 49827 : 8201593: Print array length in ArrayIndexOutOfBoundsException.
*** 625,638 ****
assert(continuation != NULL, "no handler found");
return continuation;
}
! JRT_ENTRY(void, Runtime1::throw_range_check_exception(JavaThread* thread, int index))
NOT_PRODUCT(_throw_range_check_exception_count++;)
! char message[jintAsStringSize];
! sprintf(message, "%d", index);
SharedRuntime::throw_and_post_jvmti_exception(thread, vmSymbols::java_lang_ArrayIndexOutOfBoundsException(), message);
JRT_END
JRT_ENTRY(void, Runtime1::throw_index_exception(JavaThread* thread, int index))
--- 625,638 ----
assert(continuation != NULL, "no handler found");
return continuation;
}
! JRT_ENTRY(void, Runtime1::throw_range_check_exception(JavaThread* thread, int index, arrayOopDesc* a))
NOT_PRODUCT(_throw_range_check_exception_count++;)
! char message[2 * jintAsStringSize + strlen("Index %d out-of-bounds for length %d.")];
! sprintf(message, "Index %d out-of-bounds for length %d.", index, a->length());
SharedRuntime::throw_and_post_jvmti_exception(thread, vmSymbols::java_lang_ArrayIndexOutOfBoundsException(), message);
JRT_END
JRT_ENTRY(void, Runtime1::throw_index_exception(JavaThread* thread, int index))
< prev index next >