< prev index next >

src/hotspot/share/c1/c1_Runtime1.cpp

Print this page
rev 49800 : 8201593: Print array length in ArrayIndexOutOfBoundsException.

*** 625,639 **** 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)) NOT_PRODUCT(_throw_index_exception_count++;) --- 625,640 ---- 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++;) ! JavaCallArguments args; ! args.push_int(index); ! args.push_int(a->length()); ! THROW_ARG(vmSymbols::java_lang_ArrayIndexOutOfBoundsException(), vmSymbols::int_int_void_signature(), &args); JRT_END JRT_ENTRY(void, Runtime1::throw_index_exception(JavaThread* thread, int index)) NOT_PRODUCT(_throw_index_exception_count++;)
< prev index next >