src/hotspot/share/runtime/reflection.cpp
changeset 50304 d5331b94f821
parent 49982 9042ffe5b7fe
child 50735 2f2af62dfac7
--- a/src/hotspot/share/runtime/reflection.cpp	Wed May 30 16:36:35 2018 +0530
+++ b/src/hotspot/share/runtime/reflection.cpp	Wed May 30 11:39:26 2018 +0200
@@ -337,7 +337,7 @@
     THROW_0(vmSymbols::java_lang_NullPointerException());
   }
   if (length < 0) {
-    THROW_0(vmSymbols::java_lang_NegativeArraySizeException());
+    THROW_MSG_0(vmSymbols::java_lang_NegativeArraySizeException(), err_msg("%d", length));
   }
   if (java_lang_Class::is_primitive(element_mirror)) {
     Klass* tak = basic_type_mirror_to_arrayklass(element_mirror, CHECK_NULL);
@@ -369,7 +369,7 @@
   for (int i = 0; i < len; i++) {
     int d = dim_array->int_at(i);
     if (d < 0) {
-      THROW_0(vmSymbols::java_lang_NegativeArraySizeException());
+      THROW_MSG_0(vmSymbols::java_lang_NegativeArraySizeException(), err_msg("%d", d));
     }
     dimensions[i] = d;
   }